/**
 * Website Development - Unified Styles
 * Light Professional Theme with Animations
 */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fa;
    color: #333333;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #0052a3;
}

/* Layout */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header */
.header {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    padding: 16px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-out;
}

.header h1 {
    font-size: 1.25rem;
    color: #333333;
    font-weight: 600;
    transition: color 0.3s ease;
}

.header h1:hover {
    color: #0066cc;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    color: #666666;
    font-size: 0.9rem;
}

.user-info strong {
    color: #0066cc;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    background: #f5f7fa;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 1.5rem;
    color: #333333;
    font-weight: 600;
}

/* ========== ANIMATIONS ========== */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 102, 204, 0.2), 0 0 40px rgba(0, 102, 204, 0.1); }
    50% { box-shadow: 0 0 30px rgba(0, 102, 204, 0.3), 0 0 60px rgba(0, 102, 204, 0.15); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes borderGlow {
    0%, 100% { border-color: rgba(0, 102, 204, 0.3); }
    50% { border-color: rgba(0, 102, 204, 0.6); }
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* Login & Landing Pages */
.login-page,
.landing-page,
.dashboard-page {
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Subtle animated background pattern */
.login-page::before,
.landing-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(0, 102, 204, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(0, 102, 204, 0.03) 0%, transparent 50%);
    pointer-events: none;
    animation: pulse 8s ease-in-out infinite;
}

.login-page::after,
.landing-page::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.02) 0%, transparent 60%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.login-container,
.landing-container {
    width: 100%;
    max-width: 95%;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

.login-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 102, 204, 0.2);
}

.login-box h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 8px;
    text-align: center;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.login-box .subtitle {
    color: #666666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 0.9rem;
    animation: fadeIn 0.8s ease-out 0.3s both;
}

.login-box .form-group {
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.login-box .form-group:nth-child(2) {
    animation-delay: 0.5s;
}

.login-box .btn {
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    animation: fadeIn 0.8s ease-out 0.7s both;
}

.login-footer a {
    color: #666666;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #0066cc;
}

/* Landing Page */
.landing-container {
    text-align: center;
    max-width: 1000px;
}

.landing-container h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333333;
    font-weight: 600;
    animation: fadeIn 0.8s ease-out;
}

.landing-container p {
    font-size: 1.1rem;
    color: #666666;
    margin-bottom: 2rem;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.landing-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.landing-buttons .btn-primary {
    background: linear-gradient(135deg, #1a1f36, #252b45);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.landing-buttons .btn-primary:hover {
    background: linear-gradient(135deg, #252b45, #1a1f36);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.4);
}

.landing-buttons .btn-outline {
    background: transparent;
    color: #0066cc;
    border: 2px solid #0066cc;
}

.landing-buttons .btn-outline:hover {
    background: rgba(0, 102, 204, 0.1);
    color: #0066cc;
    border-color: #0066cc;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.2);
    transform: translateY(-2px);
}

/* Cards */
.card {
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.5s ease-out;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 102, 204, 0.1);
    border-color: rgba(0, 102, 204, 0.3);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.card-header h3 {
    font-size: 1.1rem;
    color: #333333;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

.card-danger {
    border-color: #ffcccc;
}

.card-danger:hover {
    border-color: rgba(220, 53, 69, 0.5);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(220, 53, 69, 0.1);
}

.card-danger .card-header {
    background: #fff5f5;
    border-color: #ffcccc;
}

.card-danger .card-header h3 {
    color: #dc3545;
}

/* Forms */
.form-group,
.mb-3 {
    margin-bottom: 20px;
}

.form-group label,
.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #555555;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group input[type="url"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea,
.form-control,
.form-select {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 1rem;
    background: #ffffff;
    color: #333333;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15), 0 0 20px rgba(0, 102, 204, 0.1);
    transform: translateY(-2px);
}

.form-group input:disabled,
.form-control:disabled,
.form-select:disabled {
    background: #f5f5f5;
    color: #999999;
    cursor: not-allowed;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #888888;
    font-size: 0.8rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Input Group */
.input-group {
    display: flex;
    align-items: center;
}

.input-group input {
    border-radius: 0;
    flex: 1;
}

.input-prefix,
.input-suffix {
    padding: 12px 16px;
    background: #f5f5f5;
    border: 1px solid #d0d0d0;
    color: #666666;
    font-family: monospace;
    white-space: nowrap;
}

.input-prefix {
    border-radius: 6px 0 0 6px;
    border-right: none;
}

.input-suffix {
    border-radius: 0 6px 6px 0;
    border-left: none;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, #1a1f36, #252b45);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #252b45, #1a1f36);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.4);
    transform: translateY(-3px);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.btn-secondary {
    background: #f5f5f5;
    color: #333333;
    border: 1px solid #d0d0d0;
}

.btn-secondary:hover {
    background: #e8e8e8;
    border-color: #0066cc;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.15);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #ff4757);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #ff6b7a);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    color: #0066cc;
    border: 2px solid #0066cc;
}

.btn-outline:hover {
    background: rgba(0, 102, 204, 0.1);
    color: #0066cc;
    box-shadow: 0 0 20px rgba(0, 102, 204, 0.2);
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.table th,
.table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.table th {
    background: #f8f9fa;
    color: #0066cc;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    color: #333333;
    transition: background 0.2s ease;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(0, 102, 204, 0.05);
    transform: scale(1.005);
}

.table tbody tr:hover td {
    color: #000000;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.cell-subtext {
    font-size: 0.8rem;
    color: #888888;
    margin-top: 2px;
}

.results-info {
    font-size: 0.9rem;
    color: #666666;
    margin-bottom: 12px;
}

.table code {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #0066cc;
}

/* Details Table */
.details-table {
    width: 100%;
}

.details-table th,
.details-table td {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.details-table th {
    text-align: left;
    color: #666666;
    font-weight: 500;
    width: 150px;
}

.details-table td code {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #0066cc;
}

/* Credentials Box */
.credentials-box {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.credentials-box h4 {
    color: #333333;
    margin-bottom: 16px;
    font-size: 1rem;
}

.credentials-table {
    width: 100%;
}

.credentials-table th,
.credentials-table td {
    padding: 10px 0;
}

.credentials-table th {
    text-align: left;
    color: #666666;
    font-weight: 500;
    width: 120px;
}

.credentials-table td code {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #0066cc;
    display: inline-block;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.badge:hover {
    transform: scale(1.05);
}

.badge-success {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.2);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #d39e00;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.2);
}

.badge-error {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.2);
}

.badge-primary {
    background: rgba(0, 102, 204, 0.15);
    color: #0066cc;
    box-shadow: 0 0 10px rgba(0, 102, 204, 0.2);
}

.badge-info {
    background: rgba(23, 162, 184, 0.15);
    color: #17a2b8;
    box-shadow: 0 0 10px rgba(23, 162, 184, 0.2);
}

/* Alerts */
@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    animation: alertSlideIn 0.4s ease-out;
}

.alert-error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.1);
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.1);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #d39e00;
    border: 1px solid rgba(255, 193, 7, 0.3);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.1);
}

.alert-info {
    background: rgba(0, 102, 204, 0.1);
    color: #0066cc;
    border: 1px solid rgba(0, 102, 204, 0.3);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 2px dashed #d0d0d0;
}

.empty-state p {
    color: #666666;
    font-size: 1.1rem;
}

.empty-state a {
    color: #0066cc;
}

/* Dashboard Specific */
.dashboard-container {
    max-width: 800px;
    width: 100%;
}

.dashboard-header {
    max-width: 800px;
    width: 100%;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dashboard-header h1 {
    color: #333333;
    font-size: 1.25rem;
}

.dashboard-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dashboard-card h2 {
    color: #333333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.dashboard-card p {
    color: #666666;
    margin-bottom: 20px;
}

.site-preview {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.preview-btn {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, #1a1f36, #252b45);
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.preview-btn:hover {
    background: linear-gradient(135deg, #0052a3, #0077cc);
    color: #ffffff;
    transform: translateY(-1px);
}

.logout-btn {
    display: inline-block;
    padding: 14px 28px;
    background: transparent;
    color: #dc3545;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    border: 1px solid #dc3545;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Client Toolbar (overlay on client sites) */
#client-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e0e0e0;
}

#client-toolbar .toolbar-info {
    color: #666666;
    font-size: 14px;
}

#client-toolbar .toolbar-info strong {
    color: #0066cc;
}

#client-toolbar .toolbar-logout {
    background: linear-gradient(135deg, #0066cc, #0099ff);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

#client-toolbar .toolbar-logout:hover {
    background: linear-gradient(135deg, #0052a3, #0077cc);
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #333333;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card.stat-success .stat-number {
    color: #28a745;
}

.stat-card.stat-warning .stat-number {
    color: #d39e00;
}

.stat-card.stat-danger .stat-number {
    color: #dc3545;
}

/* Filter Bar */
.filter-bar {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.search-box {
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: 95%;
}

.search-box input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #ffffff;
    color: #333333;
}

.search-box input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.filter-options {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-options select {
    padding: 10px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #ffffff;
    color: #333333;
    cursor: pointer;
}

.filter-options select:focus {
    outline: none;
    border-color: #0066cc;
}

@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: none;
    }

    .filter-options {
        justify-content: flex-start;
    }
}

/* Admin Layout */
.admin-wrapper {
    min-height: 100vh;
    background: #f5f7fa;
    display: flex;
}

/* Hide old admin header/nav (replaced by sidebar) */
.admin-header { display: none; }
.admin-nav { display: none; }

/* Admin Sidebar */
.admin-sidebar {
    width: 260px;
    background: #1a1f2e;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.admin-sidebar-brand {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-sidebar-brand h1 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}
.admin-sidebar-brand h1 a {
    color: #fff;
    text-decoration: none;
}
.admin-sidebar-badge {
    background: #0066cc;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.admin-sidebar-user {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-sidebar-user-initials {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066cc, #0055aa);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}
.admin-sidebar-user-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-sidebar-nav {
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
}
.admin-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}
.admin-sidebar-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}
.admin-sidebar-link.active {
    color: #fff;
    background: rgba(0,102,204,0.15);
    border-left-color: #0066cc;
}
.admin-sidebar-icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* Sidebar Submenu Groups */
.admin-sidebar-group {
    border-left: 3px solid transparent;
}
.admin-sidebar-group-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    color: rgba(255,255,255,0.6);
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.admin-sidebar-group-toggle:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}
.admin-sidebar-chevron {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.2s;
}
.admin-sidebar-group.open .admin-sidebar-chevron {
    transform: rotate(90deg);
}
.admin-sidebar-group.open > .admin-sidebar-group-toggle {
    color: rgba(255,255,255,0.9);
}
.admin-sidebar-submenu {
    display: none;
    padding: 2px 0;
    background: rgba(0,0,0,0.15);
}
.admin-sidebar-group.open > .admin-sidebar-submenu {
    display: block;
}
.admin-sidebar-submenu a {
    display: block;
    padding: 8px 24px 8px 56px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.84rem;
    transition: all 0.15s;
}
.admin-sidebar-submenu a:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}
.admin-sidebar-submenu a.active {
    color: #fff;
    background: rgba(0,102,204,0.15);
}
.admin-sidebar-bottom {
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* Admin Mobile Header */
.admin-mobile-header {
    display: none;
    background: #fff;
    padding: 12px 20px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 40;
}
.admin-mobile-header h1 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.admin-main {
    padding: 30px;
    flex: 1;
    margin-left: 260px;
    max-width: none;
}

@media (max-width: 768px) {
    .admin-sidebar {
        display: none;
    }
    .admin-mobile-header {
        display: flex;
    }
    .admin-main {
        margin-left: 0;
        padding: 20px 15px;
    }
}

/* Admin Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.grid-1-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

.grid-3-1 {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 24px;
}

/* Span utilities */
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-full { grid-column: 1 / -1; }

/* Responsive grid */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2-1, .grid-1-2, .grid-3-1 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .col-span-2, .col-span-3 { grid-column: span 1; }
}

/* Card enhancements */
.card-grid {
    display: grid;
    gap: 20px;
}

.card-compact {
    padding: 0;
}

.card-compact .card-header {
    padding: 16px 20px;
}

.card-compact .card-body {
    padding: 20px;
}

/* Mini stat cards */
.mini-stat {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.mini-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #333333;
    line-height: 1.2;
}

.mini-stat-label {
    font-size: 0.85rem;
    color: #666666;
    margin-top: 4px;
}

.mini-stat-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.mini-stat.success { border-left: 4px solid #28a745; }
.mini-stat.warning { border-left: 4px solid #ffc107; }
.mini-stat.danger { border-left: 4px solid #dc3545; }
.mini-stat.info { border-left: 4px solid #17a2b8; }
.mini-stat.primary { border-left: 4px solid #0066cc; }

/* Info list inside cards */
.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list .label {
    color: #666666;
}

.info-list .value {
    font-weight: 500;
    color: #333333;
}

/* Quick action cards */
.action-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
}

.action-card:hover {
    border-color: #0066cc;
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.15);
    transform: translateY(-2px);
}

.action-card-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.action-card-title {
    font-weight: 600;
    color: #333333;
    margin-bottom: 4px;
}

.action-card-desc {
    font-size: 0.85rem;
    color: #666666;
}

/* Dropdown Navigation Styles (kept for mobile nav) */

/* Password Toggle */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    flex: 1;
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666666;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #0066cc;
}

.password-toggle.active {
    color: #0066cc;
}

.eye-icon {
    width: 20px;
    height: 20px;
}

/* Client Portal Layout */
.client-wrapper {
    min-height: 100vh;
    background: #f5f7fa;
    display: flex;
}

/* Client Sidebar */
.client-sidebar {
    width: 260px;
    background: #1a1f2e;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 10;
}
.sidebar-brand {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand h1 {
    font-size: 1.15rem;
    color: #fff;
    font-weight: 600;
    margin: 0;
}
.sidebar-user {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}
.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.15);
    flex-shrink: 0;
}
.sidebar-user-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066cc, #0055aa);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}
.sidebar-user-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Site Switcher */
.sidebar-site-switcher {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-switcher-select {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    appearance: auto;
}
.site-switcher-select:hover {
    background: rgba(255,255,255,0.12);
}
.site-switcher-select option {
    background: #1a1f2e;
    color: #fff;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}
.sidebar-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}
.sidebar-link.active {
    color: #fff;
    background: rgba(0,102,204,0.15);
    border-left-color: #0066cc;
}
.sidebar-icon {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}
.sidebar-badge {
    background: #dc3545;
    color: #fff;
    font-size: 0.7rem;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
    margin-left: auto;
}
.sidebar-bottom {
    padding: 12px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* Mobile header (hidden on desktop) */
.client-mobile-header {
    display: none;
}

/* Hide old top nav/header elements */
.client-header { display: none; }
.client-nav { display: none; }

/* Main content area */
.client-main {
    padding: 30px;
    flex: 1;
    margin-left: 260px;
    max-width: none;
}

@media (max-width: 768px) {
    .client-sidebar {
        display: none;
    }
    .client-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 15px;
        background: #fff;
        border-bottom: 1px solid #e0e0e0;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }
    .client-mobile-header h1 {
        font-size: 1.1rem;
        color: #333;
        font-weight: 600;
        margin: 0;
    }
    .client-main {
        margin-left: 0;
        padding: 20px 15px;
    }
}

/* File Browser Table */
.file-table {
    width: 100%;
}

.file-table th,
.file-table td {
    padding: 12px 16px;
}

.file-table tbody tr:hover {
    background: #f8f9fa;
}

.file-table a {
    color: #333333;
    text-decoration: none;
}

.file-table a:hover {
    color: #0066cc;
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.95rem;
    list-style: none;
    padding-left: 0;
}

.breadcrumb-item + .breadcrumb-item {
    padding-left: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding-right: 0.5rem;
    color: #999;
    float: left;
}

.breadcrumb a {
    color: #0066cc;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Card Header with Actions */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-overlay .modal-content {
    /* Public site custom modals only */
    background: #ffffff;
    border-radius: 8px;
    padding: 30px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid #e0e0e0;
}

.modal-overlay .modal-content h3 {
    margin-bottom: 10px;
    color: #333333;
}

.modal-overlay .modal-content p {
    color: #666666;
    margin-bottom: 20px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666666;
    cursor: pointer;
}

.modal-close:hover {
    color: #333333;
}

/* Utility */
ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

ul li {
    margin-bottom: 6px;
    color: #666666;
}

/* Code blocks */
code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #0066cc;
}

pre {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid #e0e0e0;
}

pre code {
    background: none;
    padding: 0;
}

/* Log viewer */
.log-viewer {
    background: #1a1a2e;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 600px;
    overflow-y: auto;
}

.log-viewer:empty::before {
    content: 'Log file is empty.';
    color: #666666;
}

.log-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.log-stat {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px 20px;
    min-width: 150px;
}

.log-stat .value {
    font-size: 1.25rem;
    font-weight: bold;
    color: #333333;
}

.log-stat .label {
    font-size: 0.85rem;
    color: #666666;
    margin-top: 5px;
}

.log-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.log-line-error { color: #dc3545; }
.log-line-warning { color: #d39e00; }
.log-line-success { color: #28a745; }
.log-line-info { color: #17a2b8; }
.log-line-date { color: #6f42c1; }

/* Tools page grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tool-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
}

.tool-card:hover {
    border-color: #0066cc;
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.15);
    transform: translateY(-2px);
}

.tool-card h3 {
    color: #333333;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.tool-card p {
    color: #666666;
    font-size: 0.9rem;
    margin: 0;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
}

.pagination a {
    background: #ffffff;
    color: #333333;
    border: 1px solid #d0d0d0;
}

.pagination a:hover {
    background: #f5f5f5;
    border-color: #0066cc;
}

.pagination .current {
    background: linear-gradient(135deg, #0066cc, #0099ff);
    color: #ffffff;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.tab {
    padding: 12px 20px;
    color: #666666;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab:hover {
    color: #333333;
}

.tab.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
}

/* Progress bar */
.progress-bar {
    background: #e0e0e0;
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
}

.progress-bar .progress {
    background: linear-gradient(90deg, #0066cc, #0099ff);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Tooltips */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: #333333;
    color: #ffffff;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
}

/* ========== ADDITIONAL ANIMATIONS ========== */

/* Page load animation for main content */
.admin-main,
.client-main,
.main-content {
    animation: fadeIn 0.5s ease-out;
}

/* Staggered card animations */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.15s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.25s; }
.card:nth-child(5) { animation-delay: 0.3s; }
.card:nth-child(6) { animation-delay: 0.35s; }

/* Loading spinner */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #0066cc;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

/* Typing cursor effect for headings */
@keyframes blink {
    0%, 50% { border-color: #0066cc; }
    51%, 100% { border-color: transparent; }
}

.typing-cursor {
    border-right: 2px solid #0066cc;
    animation: blink 1s infinite;
    padding-right: 4px;
}

/* Ripple effect for buttons */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 10%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

.btn-ripple:active::after {
    transform: scale(0);
    opacity: 1;
    transition: 0s;
}

/* Floating action button */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066cc, #0099ff);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

.fab:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 102, 204, 0.5);
}

/* Skeleton loading animation */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 1em;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Pulse dot for status indicators */
@keyframes statusPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-dot.online {
    background: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
    animation: statusPulse 2s infinite;
}

.status-dot.offline {
    background: #dc3545;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

.status-dot.pending {
    background: #ffc107;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
    animation: statusPulse 1.5s infinite;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== MOBILE HAMBURGER MENU ========== */

/* Hamburger Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #333333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) {
    margin-bottom: 6px;
}

.menu-toggle span:nth-child(3) {
    margin-top: 6px;
}

/* Hamburger animation when open */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
}

/* Mobile Navigation Panel */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding-top: 60px;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666666;
    cursor: pointer;
    padding: 5px;
}

.mobile-nav-close:hover {
    color: #333333;
}

.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav a {
    display: block;
    padding: 16px 20px;
    color: #333333;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    background: rgba(0, 102, 204, 0.1);
    color: #0066cc;
}

/* Mobile Nav Dropdown */
.mobile-nav .nav-dropdown-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    color: #333333;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav .nav-dropdown-title::after {
    content: '▼';
    font-size: 10px;
    transition: transform 0.3s ease;
}

.mobile-nav .nav-dropdown-title.active::after {
    transform: rotate(180deg);
}

.mobile-nav .nav-dropdown-menu {
    display: none;
    background: #f8f9fa;
}

.mobile-nav .nav-dropdown-menu.active {
    display: block;
}

.mobile-nav .nav-dropdown-menu a {
    padding-left: 35px;
    font-size: 0.95rem;
    color: #555555;
}

/* Mobile User Info */
.mobile-nav-user {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-nav-user .user-info {
    font-size: 0.9rem;
    color: #666666;
}

.mobile-nav-user .user-info strong {
    color: #0066cc;
}

/* Show hamburger on mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .mobile-nav-overlay {
        display: block;
        pointer-events: none;
    }

    .mobile-nav-overlay.active {
        pointer-events: auto;
    }

    /* Admin main content padding handled by admin sidebar responsive rules above */

    /* Page header stack on mobile */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .page-header .btn {
        width: 100%;
    }

    /* Stats grid 2 columns on mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-card .stat-number {
        font-size: 1.5rem;
    }

    /* Hide less important table columns on mobile */
    .table .hide-mobile {
        display: none;
    }

    /* Action buttons stack */
    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }

    .action-buttons .btn {
        width: 100%;
        text-align: center;
    }

    /* Login box smaller padding */
    .login-box {
        padding: 25px 20px;
    }

    .login-box h1 {
        font-size: 1.5rem;
    }

    /* Landing page */
    .landing-hero h1 {
        font-size: 1.75rem;
    }

    .landing-hero p {
        font-size: 1rem;
    }

    .landing-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .landing-buttons .btn {
        width: 100%;
    }

    /* About cards */
    .landing-about-content {
        grid-template-columns: 1fr;
    }

    /* Dashboard header */
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px;
    }
}

/* Templates page mobile nav */
@media (max-width: 768px) {
    .templates-nav-inner {
        padding: 10px 0;
    }

    .templates-nav-links {
        display: none;
    }

    .templates-nav .menu-toggle {
        display: flex;
    }

    .templates-header h1 {
        font-size: 1.5rem;
    }

    .templates-grid {
        grid-template-columns: 1fr;
    }

    .categories-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .category-chip {
        flex-shrink: 0;
    }
}

/* ========== COMPREHENSIVE MOBILE STYLES ========== */

/* Admin sidebar mobile */
@media (max-width: 1024px) {
    .admin-wrapper {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px;
    }

    .admin-sidebar .sidebar-brand {
        width: 100%;
        margin-bottom: 10px;
        justify-content: center;
    }

    .admin-sidebar nav {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        justify-content: center;
        width: 100%;
    }

    .admin-sidebar nav a {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .admin-main {
        margin-left: 0;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    /* Admin wrapper */
    .admin-wrapper {
        min-height: auto;
    }

    .admin-sidebar {
        padding: 8px;
    }

    .admin-sidebar nav a {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .admin-sidebar nav a span {
        display: none;
    }

    .admin-main {
        padding: 12px;
    }

    /* Cards */
    .card {
        margin-bottom: 15px;
    }

    .card-header {
        padding: 12px 15px;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .card-header h3 {
        font-size: 1rem;
    }

    .card-body {
        padding: 15px;
    }

    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-group,
    .mb-3 {
        margin-bottom: 15px;
    }

    .form-group label,
    .form-label {
        font-size: 0.85rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea,
    .form-control,
    .form-select {
        padding: 10px 12px;
        font-size: 14px;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        font-size: 0.8rem;
        min-width: 0; width: 100%;
    }

    .table th,
    .table td {
        padding: 8px 10px;
    }

    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .btn-sm {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    /* Client dashboard */
    .client-wrapper {
        flex-direction: column;
    }

    .client-header {
        padding: 12px 15px;
        flex-direction: column;
        gap: 12px;
    }

    .client-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .client-nav a {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .client-main {
        padding: 15px;
    }

    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Alerts */
    .alert {
        padding: 12px 15px;
        font-size: 0.85rem;
    }

    /* Modals - public site custom modals only */
    .modal-overlay .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 15px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-overlay .modal-header {
        padding: 15px;
    }

    .modal-overlay .modal-body {
        padding: 15px;
    }

    .modal-overlay .modal-footer {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }

    .modal-overlay .modal-footer .btn {
        width: 100%;
    }

    /* Tools page */
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .tool-card {
        padding: 15px;
    }

    .tool-card h3 {
        font-size: 1rem;
    }

    /* dTerm pages */
    .dterm-header {
        padding: 12px 15px;
        flex-direction: column;
        gap: 12px;
    }

    .dterm-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .dterm-main {
        padding: 15px;
    }

    /* File browser */
    .file-browser {
        font-size: 0.85rem;
    }

    .file-item {
        padding: 10px;
    }

    /* Messages */
    .message-list {
        font-size: 0.85rem;
    }

    .message-item {
        padding: 12px;
    }

    /* Tabs */
    .tabs {
        flex-wrap: wrap;
        gap: 5px;
    }

    .tab {
        padding: 8px 12px;
        font-size: 0.85rem;
        flex: 1 1 auto;
        text-align: center;
    }

    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }

    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    /* Breadcrumbs */
    .breadcrumb {
        font-size: 0.8rem;
        flex-wrap: wrap;
    }

    /* Search */
    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    /* Preview iframe */
    .preview-frame {
        height: 300px;
    }
}

@media (max-width: 480px) {
    /* Very small screens */
    .admin-main,
    .client-main,
    .dterm-main {
        padding: 10px;
    }

    .page-header h2 {
        font-size: 1.1rem;
    }

    .card-header h3 {
        font-size: 0.95rem;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-card .stat-number {
        font-size: 1.25rem;
    }

    .stat-card .stat-label {
        font-size: 0.7rem;
    }

    .btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .table {
        font-size: 0.75rem;
    }

    .table th,
    .table td {
        padding: 6px 8px;
    }

    /* Login/Register pages */
    .login-container,
    .register-container {
        padding: 15px;
    }

    .login-box,
    .register-box {
        padding: 20px 15px;
    }

    .login-box h1,
    .register-box h1 {
        font-size: 1.25rem;
    }

    /* Hide overflow text */
    .truncate {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }
}

/* Utility classes for mobile */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    .show-mobile {
        display: block !important;
    }

    .text-center-mobile {
        text-align: center !important;
    }

    .full-width-mobile {
        width: 100% !important;
    }

    .stack-mobile {
        flex-direction: column !important;
    }
}

/* ========== MOBILE FIX - FORCE HIDE SIDEBAR ========== */
@media (max-width: 768px) {
    .admin-sidebar,
    .admin-sidebar.has-topbar,
    aside.admin-sidebar {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    
    .admin-mobile-header {
        display: flex !important;
    }
    
    .admin-main {
        margin-left: 0 !important;
        padding: 15px !important;
    }
    
    .admin-wrapper {
        padding-top: 0 !important;
    }
    
    /* Table mobile fixes */
    .hide-mobile,
    .table .hide-mobile,
    th.hide-mobile,
    td.hide-mobile {
        display: none !important;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 10px 8px;
        white-space: nowrap;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .action-buttons {
        display: flex;
        gap: 4px;
    }
    
    .action-buttons .btn {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
    
    .card-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch !important;
    }
    
    .card-header .btn {
        width: 100%;
    }
    
    .filter-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-form .search-box,
    .filter-form select,
    .filter-form input {
        width: 100% !important;
        max-width: none !important;
    }
}

@media (max-width: 480px) {
    .table th,
    .table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    
    .badge {
        font-size: 0.65rem;
        padding: 3px 6px;
    }
    
    .admin-main {
        padding: 8px !important;
    }
}


/* ========== MOBILE STACKED CARD TABLE LAYOUT ========== */
@media (max-width: 768px) {
    * { box-sizing: border-box !important; }
    html, body { overflow-x: hidden !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
    .admin-wrapper { width: 100% !important; overflow-x: hidden !important; padding: 0 !important; margin: 0 !important; }
    .admin-main { margin: 0 !important; margin-left: 0 !important; width: 100% !important; padding: 6px !important; overflow: hidden !important; }

    .table-responsive { overflow: visible !important; width: 100% !important; }
    .table { min-width: 0 !important; width: 100% !important; border-collapse: collapse; }
    .table thead { display: none !important; }
    .table, .table tbody { display: block !important; width: 100% !important; }

    .table tr {
        display: block !important;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 6px;
        margin: 0 0 8px 0 !important;
        padding: 8px !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.08);
        width: 100% !important;
        overflow: visible !important;
    }

    .table td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 6px 0 !important;
        border: none !important;
        border-bottom: 1px solid #f0f0f0 !important;
        font-size: 0.8rem;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #888;
        font-size: 0.7rem;
        text-transform: uppercase;
        flex-shrink: 0;
        margin-right: 10px;
    }

    .table td:first-child {
        display: block !important;
        padding-bottom: 8px !important;
        border-bottom: 1px solid #ddd !important;
    }

    .table td:first-child::before { display: none; }

    .table td:last-child {
        border-bottom: none !important;
        padding-top: 8px !important;
    }

    .table td:last-child::before { display: none; }

    .table td code { font-size: 0.75rem; word-break: break-all; }

    .page-header { flex-direction: column; gap: 10px; align-items: stretch !important; }
    .page-header h2 { font-size: 1.1rem; margin: 0; }
    .page-header .btn { text-align: center; }

    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
}

/* ========== FINAL MOBILE OVERRIDE ========== */
@media (max-width: 768px) {
    html, body, .admin-wrapper, .admin-main, .table-responsive, .filter-bar, .page-header, .stats-grid {
        padding-left: 5px !important;
        padding-right: 5px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    .admin-main {
        padding: 5px !important;
    }
    .table tr {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 8px !important;
    }
    .stats-grid {
        gap: 5px !important;
    }
    .filter-bar {
        padding: 10px !important;
    }
}

/* All admin modals - wider and centered accounting for sidebar */
body:has(.admin-wrapper) .modal {
    left: 260px;
    width: calc(100% - 260px);
}
body:has(.admin-wrapper) .modal-dialog {
    max-width: 1100px;
    margin: 1.75rem auto;
}
@media (max-width: 768px) {
    body:has(.admin-wrapper) .modal {
        left: 0;
        width: 100%;
    }
    body:has(.admin-wrapper) .modal-dialog {
        width: 95%;
    }
}
