:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 12px;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
body {
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.5;
}
.hidden {
    display: none !important;
}
.mt-4 {
    margin-top: 1rem;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}
.animate-pop {
    animation: popIn 0.3s ease forwards;
}
.view-full {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, #4f46e5, #1e1b4b);
    padding: 20px;
}
.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.login-header h1 {
    font-size: 1.5rem;
    margin-top: 1rem;
}
.login-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}
.logo-icon {
    background: var(--primary);
    color: white;
    padding: 8px;
    border-radius: 10px;
}
.logo-icon-sm {
    background: var(--primary);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
}
.main-nav {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
}
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav-list {
    list-style: none;
    display: flex;
    gap: 0.5rem;
}
.nav-link {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}
.nav-link:hover {
    background: var(--bg);
    color: var(--primary);
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 2rem;
    border-left: 1px solid var(--border);
}
.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}
.btn-logout {
    background: var(--bg);
    border: none;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}
.btn-logout:hover {
    background: #fee2e2;
}
.page-header {
    margin-bottom: 2rem;
}
.page-header h1 {
    font-size: 1.8rem;
    color: var(--text-main);
}
.page-header p {
    color: var(--text-muted);
}
.card {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1rem;
}
.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}
.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.admin-menu-dropdown {
    position: relative;
    margin-bottom: 1.5rem;
    display: inline-block;
    width: 100%;
    max-width: 350px;
}
.admin-menu-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: 0.2s;
}
.admin-menu-btn:hover {
    border-color: var(--primary);
}
.admin-menu-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    z-index: 20;
    list-style: none;
    overflow: hidden;
}
.admin-menu-list li {
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 500;
    transition: 0.2s;
}
.admin-menu-list li:last-child {
    border-bottom: none;
}
.admin-menu-list li:hover {
    background: var(--bg);
    color: var(--primary);
    padding-left: 1.5rem;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: middle;
}
.data-table tr:hover {
    background: #f8fafc;
}
.input-group {
    margin-bottom: 1.2rem;
}
.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #334155;
}
.input-group input,
.input-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    gap: 6px;
    transition: 0.2s;
    font-size: 0.95rem;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.btn:active {
    transform: translateY(0);
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary {
    background: var(--secondary);
    color: white;
}
.btn-secondary:hover { background: #475569; }
.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover { background: #059669; }
.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}
.btn-ghost:hover {
    background: var(--bg);
    color: var(--text-main);
}
.btn-block {
    width: 100%;
    margin-top: 0.5rem;
}
.btn-lg {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
    align-items: start;
}
.standard-form {
    padding: 1.5rem;
}
.search-box {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    outline: none;
    width: 260px;
}
.search-box:focus {
    border-color: var(--primary);
}
.status-badge {
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-block;
}
.status-active {
    background: #dcfce7;
    color: #166534;
}
.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}
.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 5px;
}
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    cursor: pointer;
}
.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}
.login-divider span {
    padding: 0 10px;
}
.login-footer {
    text-align: center;
}
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
}
.toast {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary);
    margin-top: 0.5rem;
    font-weight: 600;
}
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
}
.modal-content {
    position: relative;
    background: white;
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
#copy-text-area, #php-code-area {
    width: 100%;
    height: 250px;
    margin-top: 15px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    resize: none;
    background: #1e293b;
    color: #f8fafc;
    outline: none;
}
#copy-text-area {
    background: #f8fafc;
    color: var(--text-main);
}
#copy-text-area:focus, #php-code-area:focus {
    border-color: var(--primary);
}
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}