/* Wedding Stories Admin - Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --radius: 8px;
}

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

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

/* Layout */
.admin-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    width: 250px;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    font-size: 1.5rem;
}

.sidebar-title {
    font-weight: 600;
    color: white;
    font-size: 1.1rem;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-icon {
    font-size: 1.1rem;
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 0;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 24px;
    min-height: 100vh;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.content-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

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

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.card-header h2,
.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-danger {
    border-color: var(--danger);
}

.card-danger .card-header {
    background: #fef2f2;
    color: var(--danger);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stats-small {
    grid-template-columns: repeat(4, 1fr);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    font-size: 2rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Content Header */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.content-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

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

.table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: #f8fafc;
}

.table td {
    font-size: 0.9rem;
}

.table code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.link-icon {
    margin-left: 8px;
    text-decoration: none;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-active {
    background: #dcfce7;
    color: #16a34a;
}

.badge-inactive {
    background: #f1f5f9;
    color: #64748b;
}

.badge-upcoming {
    background: #dbeafe;
    color: #2563eb;
}

.badge-ended {
    background: #fef3c7;
    color: #d97706;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn:hover {
    background: #f8fafc;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Forms */
.form {
    padding: 20px;
}

.form-section {
    margin-bottom: 32px;
}

.form-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

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

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input:disabled {
    background: #f8fafc;
    color: var(--text-muted);
}

.form-group small {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.input-prefix {
    display: flex;
    align-items: stretch;
}

.input-prefix span {
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-prefix input {
    border-radius: 0 var(--radius) var(--radius) 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Link Row */
.link-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.link-row label {
    font-weight: 500;
    min-width: 100px;
}

.link-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: #f8fafc;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.alert-success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.login-header p {
    color: var(--text-muted);
}

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

/* Utilities */
.text-center {
    text-align: center;
}

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

.actions {
    white-space: nowrap;
}

/* Responsive */
/* @media (max-width: 768px) {
    .admin-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
    .form-row { grid-template-columns: 1fr; }
    .stats-small { grid-template-columns: repeat(2, 1fr); }
} */

/* Responsive */
@media (max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
        position: fixed;
        z-index: 1000;
        height: 100vh;
    }

    .sidebar.open {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .header-actions .btn {
        flex: 1;
        min-width: 45%;
        justify-content: center;
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-small {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .table-responsive {
        margin: 0 -20px;
    }

    .table th,
    .table td {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .table .actions {
        display: flex;
        gap: 4px;
    }

    .link-row {
        flex-direction: column;
        align-items: stretch;
    }

    .link-row label {
        min-width: auto;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .card {
        margin-bottom: 16px;
    }

    .card-body {
        padding: 16px;
    }

    .form {
        padding: 16px;
    }

    .form-section {
        margin-bottom: 24px;
    }

    /* Mobile menu button */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: none;
        background: var(--primary);
        color: white;
        border-radius: var(--radius);
        cursor: pointer;
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 1001;
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none;
    }
}