:root {
    --primary-color: #05007B; /* Deep Blue from TabaPay brand */
    --secondary-color: #E6F3FF; /* Light blue for active sidebar items */
    --text-main: #333333;
    --text-muted: #666666;
    --bg-main: #FFFFFF;
    --bg-sidebar: #FFFFFF;
    --border-color: #E0E0E0;
    --topbar-height: 80px;
    --sidebar-width: 280px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* Topbar Styles */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--topbar-height);
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-main {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-sub {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.9;
}

/* Hamburger Icon */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 10px;
    transition: all 0.3s linear;
    transform-origin: left;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg); }

/* Layout Container */
.container {
    display: flex;
    margin-top: var(--topbar-height);
    min-height: calc(100vh - var(--topbar-height));
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    left: 0;
    top: var(--topbar-height);
    bottom: 0;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    padding: 40px 0;
    z-index: 100;
}

nav {
    display: flex;
    flex-direction: column;
}

.nav-link {
    display: block;
    padding: 15px 40px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background-color: #f5f8fc;
}

.nav-link.active {
    background-color: var(--secondary-color);
    border-left: 3px solid var(--primary-color);
}

.nav-item-dropdown .nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chevron {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    cursor: pointer;
    padding: 4px; /* increase hit area */
}

.nav-item-dropdown.open .chevron {
    transform: rotate(-135deg);
}

.dropdown-content {
    display: none;
    max-height: 350px;
    overflow-y: auto;
    background-color: #fafbfc;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.nav-item-dropdown.open .dropdown-content {
    display: block;
}

.nav-sublink {
    display: block;
    padding: 10px 40px 10px 60px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-sublink:hover {
    color: var(--primary-color);
    background-color: #f0f4f8;
}

.nav-sublink.active {
    color: var(--primary-color);
    font-weight: 600;
    border-left: 3px solid var(--primary-color);
    background-color: var(--secondary-color);
}

/* Content Styles */
.content {
    margin-left: var(--sidebar-width);
    padding: 60px 80px;
    max-width: 1200px;
    width: 100%;
}

.content-section {
    margin-bottom: 80px;
    scroll-margin-top: calc(var(--topbar-height) + 40px);
}

.content-section h1 {
    color: var(--primary-color);
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
}

.content-section h2 {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 20px;
}

.content-section h3 {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
}

.content-section p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #4a4a4a;
}

.content-section ul {
    margin-bottom: 20px;
    padding-left: 20px;
    color: #4a4a4a;
}

.content-section li {
    margin-bottom: 10px;
}

.meta {
    font-size: 14px;
    color: var(--text-muted) !important;
    font-style: italic;
}

/* Table Styles for Licensing */
.table-container {
    overflow-x: auto;
    margin-top: 30px;
}

.licenses-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.licenses-table th, .licenses-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.licenses-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.licenses-table tr:hover {
    background-color: #f9f9f9;
}

/* Contact Card */
.contact-card {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    margin-top: 20px;
}

.contact-card p {
    margin-bottom: 10px;
}

.contact-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.contact-card a:hover {
    text-decoration: underline;
}

.disclaimer-text {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Footer Styles */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 80px;
    width: 100%;
    position: relative;
    z-index: 101;
}

.footer-content {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer .logo {
    margin-bottom: 15px;
}

.footer .copyright {
    font-size: 11px;
    color: #e0e0e0;
    font-weight: 400;
}

/* Responsive */
@media (max-width: 900px) {
    .topbar {
        justify-content: center;
    }

    .container {
        flex-direction: column;
    }

    .hamburger {
        display: flex;
        position: absolute;
        left: 40px;
    }

    .sidebar {
        position: fixed;
        top: var(--topbar-height);
        left: -100%;
        width: 250px;
        height: calc(100vh - var(--topbar-height));
        border-right: 1px solid var(--border-color);
        border-left: none;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
        padding: 20px 0;
        overflow-y: auto;
        z-index: 999;
    }

    .sidebar.active {
        left: 0;
    }

    nav {
        flex-direction: column;
        width: 100%;
    }

    .nav-link {
        padding: 15px 20px;
        border-left: 3px solid transparent;
        border-bottom: none;
    }

    .nav-link.active {
        border-left: 3px solid var(--primary-color);
        border-bottom: none;
    }

    .content {
        margin-left: 0;
        padding: 40px 20px;
    }
}
