* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background-color: #efefef;
}

/* Top Bar */
.top-bar {
    background-color: #0a0a0a;
    color: #ffffff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e97100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.top-bar h1 {
    font-size: 24px;
    font-weight: 300;
    color: #ffffff;
    margin: 0;
    letter-spacing: 0.5px;
}

.top-bar-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-button {
    background: linear-gradient(135deg, #444444 0%, #555555 100%);
    color: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.chat-button:hover {
    background: linear-gradient(135deg, #555555 0%, #666666 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
    color: white;
}

.chat-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.logout-button {
    background: linear-gradient(135deg, #444444 0%, #555555 100%);
    color: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.logout-button:hover {
    background: linear-gradient(135deg, #555555 0%, #666666 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
    color: white;
}

.logout-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar - TigerTMS Brand Colors */
.sidebar {
    width: 500px;
    min-width: 500px;
    background-color: #0a0a0a;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
}

.sidebar-header {
    padding: 20px;
    background-color: #222222;
    border-bottom: 2px solid #e97100;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-box {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    background-color: #222222;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-box::placeholder {
    color: #afafaf;
}

.search-box:focus {
    outline: none;
    border-color: #e97100;
    background-color: #2a2a2a;
    box-shadow: 0 0 0 3px rgba(233, 113, 0, 0.2);
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #afafaf;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;
}

.search-clear:hover {
    color: #ffffff;
    background-color: rgba(233, 113, 0, 0.2);
}

.search-clear.visible {
    display: flex;
}

.nav-container {
    flex: 1;
    overflow-y: auto;
    padding: 5px 0;
}

.nav-container ul {
    list-style: none;
    padding-left: 0;
}

.nav-container li {
    padding: 2px 20px;
}

.nav-container a {
    color: #afafaf;
    text-decoration: none;
    display: block;
    padding: 5px 8px;
    border-radius: 5px;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
}

.nav-container a:hover {
    background-color: rgba(233, 113, 0, 0.15);
    color: #e97100;
    padding-left: 12px;
}

.nav-container a.active {
    background-color: #e97100;
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container a.pinned-link {
    font-weight: 600;
    color: #ffffff;
    border-left: 3px solid #e97100;
    padding-left: 5px;
}

.nav-container a.pinned-link:hover {
    border-left-color: #ffffff;
}

.nav-container a.pinned-link.active {
    border-left-color: #ffffff;
}

.nav-folder {
    margin-top: 3px;
}

.folder-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 3px 0;
}

.folder-header:hover {
    background-color: rgba(233, 113, 0, 0.1);
    border-radius: 5px;
}

.folder-toggle {
    display: inline-block;
    width: 16px;
    margin-right: 8px;
    user-select: none;
    transition: transform 0.2s ease;
    color: #afafaf;
}

.folder-header.expanded .folder-toggle {
    transform: rotate(90deg);
    color: #e97100;
}

.folder-name {
    font-weight: 500;
    color: #afafaf;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
}

.folder-header:hover .folder-name {
    color: #e97100;
}

.nav-folder-content {
    margin-left: 20px;
    margin-top: 2px;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    background-color: #ffffff;
    padding: 40px;
    background-image: linear-gradient(to bottom, #efefef 0%, #ffffff 100px);
}

.policy-content {
    max-width: 900px;
    margin: 0 auto;
}

.policy-content h1 {
    color: #0a0a0a;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #e97100;
    font-weight: 300;
    font-size: 44px;
}

.policy-content h2 {
    color: #222222;
    margin-top: 35px;
    margin-bottom: 18px;
    font-weight: 300;
    font-size: 30px;
}

.policy-content h3 {
    color: #3a3a3a;
    margin-top: 25px;
    margin-bottom: 12px;
    font-weight: 400;
    font-size: 20px;
}

.policy-content p {
    line-height: 1.5;
    margin-bottom: 15px;
    color: #3a3a3a;
}

.policy-content ul, .policy-content ol {
    margin-left: 30px;
    margin-bottom: 15px;
}

.policy-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.policy-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.policy-content table th,
.policy-content table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.policy-content table th {
    background-color: #222222;
    color: white;
    font-weight: 500;
}

.policy-content table tr:nth-child(even) {
    background-color: #f7f8f9;
}

.policy-content code {
    background-color: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.policy-content pre {
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 15px 0;
}

.policy-content pre code {
    background-color: transparent;
    padding: 0;
}

.welcome-message {
    text-align: center;
    padding: 100px 20px;
    color: #595959;
}

.welcome-message h1 {
    font-size: 44px;
    margin-bottom: 24px;
    color: #0a0a0a;
    border: none;
    font-weight: 300;
}

.welcome-message p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 20px;
    color: #3a3a3a;
    line-height: 1.5;
}

.loading {
    text-align: center;
    padding: 50px;
    color: #595959;
}

/* Scrollbar styling */
.nav-container::-webkit-scrollbar {
    width: 10px;
}

.nav-container::-webkit-scrollbar-track {
    background: #222222;
}

.nav-container::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 4px;
}

.nav-container::-webkit-scrollbar-thumb:hover {
    background: #e97100;
}

.main-content {
    scrollbar-width: auto;
    scrollbar-color: #cccccc #f5f5f5;
}

.main-content::-webkit-scrollbar {
    width: 12px;
}

.main-content::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-left: 1px solid #e0e0e0;
}

.main-content::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 6px;
    border: 2px solid #f5f5f5;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: #999999;
}

.main-content::-webkit-scrollbar-thumb:active {
    background: #e97100;
}

/* Authentication Modal Styles */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeIn 0.2s ease;
}

.auth-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-modal-header {
    background-color: #0a0a0a;
    color: white;
    padding: 20px 24px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom: 3px solid #e97100;
}

.auth-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 300;
}

.auth-modal-body {
    padding: 24px;
}

.auth-form-group {
    margin-bottom: 20px;
}

.auth-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.auth-form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.auth-form-group input:focus {
    outline: none;
    border-color: #e97100;
    box-shadow: 0 0 0 3px rgba(233, 113, 0, 0.1);
}

.auth-form-group input.otp-input {
    font-size: 24px;
    letter-spacing: 8px;
    text-align: center;
    font-weight: 600;
}

.auth-button {
    width: 100%;
    padding: 12px;
    background-color: #e97100;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-button:hover:not(:disabled) {
    background-color: #ff8800;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(233, 113, 0, 0.3);
}

.auth-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.auth-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}

.auth-error.show {
    display: block;
}

.auth-success {
    color: #27ae60;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}

.auth-success.show {
    display: block;
}

.auth-step {
    display: none;
}

.auth-step.active {
    display: block;
}

.auth-info {
    color: #666;
    font-size: 13px;
    margin-top: 8px;
}
