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

:root {
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-bg-hover: rgba(255, 255, 255, 0.6);
    --glass-bg-active: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-border-focus: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    --text-primary: rgba(0, 0, 0, 0.85);
    --text-secondary: rgba(0, 0, 0, 0.5);
    --text-muted: rgba(0, 0, 0, 0.3);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

html, body {
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background: transparent;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(50px) saturate(180%);
    -webkit-backdrop-filter: blur(50px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.7);
}

.glass-input {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 15px;
    width: 100%;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.glass-input:focus {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.glass-input::placeholder {
    color: var(--text-muted);
}

textarea.glass-input {
    resize: vertical;
    min-height: 80px;
}

select.glass-input {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(0,0,0,0.3)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.6);
    color: rgba(0, 0, 0, 0.8);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.8);
}

.btn-danger {
    background: rgba(255, 59, 48, 0.15);
    border-color: rgba(255, 59, 48, 0.3);
    color: #d63031;
}

.btn-danger:hover {
    background: rgba(255, 59, 48, 0.25);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-block {
    display: flex;
    width: 100%;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.alert-success {
    background: rgba(52, 199, 89, 0.12);
    border: 1px solid rgba(52, 199, 89, 0.25);
    color: #1a7a2e;
}

.alert-error {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.25);
    color: #c0392b;
}

.alert-info {
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.25);
    color: #0056b3;
}

h1, h2, h3, h4 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(50px) saturate(180%);
    -webkit-backdrop-filter: blur(50px) saturate(180%);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 40px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
}

.login-card h1 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 4px;
    font-weight: 700;
}

.login-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

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

.dashboard {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.top-bar {
    display: none;
    align-items: center;
    padding: 10px 16px;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    position: sticky;
    top: 0;
    z-index: 10;
}

.top-bar-title {
    font-size: 18px;
    font-weight: 700;
    flex: 1;
    text-align: center;
}

.top-bar-spacer {
    width: 36px;
    flex-shrink: 0;
}

.hamburger-btn {
    width: 36px;
    height: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: rgba(0,0,0,0.6);
    border-radius: 2px;
    transition: all 0.2s;
}

.sidebar-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(80px) saturate(180%);
    -webkit-backdrop-filter: blur(80px) saturate(180%);
    border-right: 1px solid rgba(255,255,255,0.4);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 30px rgba(0,0,0,0.06);
}

.sidebar-drawer.open {
    transform: translateX(0);
}

.sidebar-close-btn {
    display: block;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: rgba(0,0,0,0.5);
    padding: 0;
    line-height: 1;
}

.sidebar-close-btn:hover {
    color: rgba(0,0,0,0.8);
}

.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    position: relative;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.4);
    color: rgba(0, 0, 0, 0.9);
    font-weight: 600;
}

.nav-item .icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-item .badge {
    margin-left: auto;
    background: rgba(255, 59, 48, 0.2);
    color: #d63031;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    position: relative;
    background: rgba(255, 255, 255, 0.08);
}

.page-header {
    margin-bottom: 28px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.page-section {
    display: none;
}

.page-section.active {
    display: block;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.collapse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius);
    cursor: pointer;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    font-family: inherit;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    width: 100%;
    text-align: left;
}

.collapse-header:hover {
    background: rgba(255, 255, 255, 0.45);
}

.collapse-header .arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
    color: var(--text-secondary);
}

.collapse-header.open .arrow {
    transform: rotate(180deg);
}

.collapse-body {
    display: none;
    padding: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.25);
    margin-bottom: 12px;
}

.collapse-body.open {
    display: block;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

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

table th {
    text-align: left;
    padding: 14px 16px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover td {
    background: rgba(255, 255, 255, 0.15);
}

.actions {
    display: flex;
    gap: 8px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(60px) saturate(180%);
    -webkit-backdrop-filter: blur(60px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-xl);
    padding: 32px;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.08);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal {
    transform: scale(1) translateY(0);
}

.modal h2 {
    font-size: 22px;
    margin-bottom: 24px;
    font-weight: 700;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    color: rgba(0, 0, 0, 0.8);
    font-size: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    animation: toastIn 0.3s ease;
    max-width: 360px;
}

.toast.success { border-left: 3px solid rgba(52, 199, 89, 0.5); }
.toast.error { border-left: 3px solid rgba(255, 59, 48, 0.5); }
.toast.info { border-left: 3px solid rgba(0, 122, 255, 0.5); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle .slider {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle .slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle input:checked + .slider {
    background: rgba(0, 0, 0, 0.3);
}

.toggle input:checked + .slider::before {
    transform: translateX(20px);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 14px;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.tag-success { background: rgba(52,199,89,0.1); color: #1a7a2e; }
.tag-warning { background: rgba(255,149,0,0.1); color: #b86e00; }
.tag-danger { background: rgba(255,59,48,0.1); color: #c0392b; }
.tag-info { background: rgba(0,122,255,0.1); color: #0056b3; }

.scrollbar-thin::-webkit-scrollbar {
    width: 4px;
}
.scrollbar-thin::-webkit-scrollbar-track {
    background: transparent;
}
.scrollbar-thin::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .top-bar {
        display: flex;
    }
    .main-content {
        padding: 20px;
        padding-top: 16px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .page-header h1 {
        font-size: 22px;
    }
}

@media (min-width: 769px) {
    .sidebar-drawer {
        position: relative;
        transform: translateX(0);
        z-index: 1;
        display: flex !important;
    }
    .sidebar-close-btn {
        display: none;
    }
    .main-content {
        padding: 32px;
    }
    .top-bar {
        display: none;
    }
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.1);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 150;
    transition: opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}

.mobile-overlay.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.link-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    font-size: 14px;
}

.package-card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
}

.package-card h4 {
    font-size: 16px;
}

.package-card p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

.feedback-item {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.feedback-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.feedback-content {
    font-size: 14px;
    margin-bottom: 8px;
}

.feedback-reply {
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.w-full { width: 100%; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.font-bold { font-weight: 700; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.overflow-auto { overflow: auto; }
