/* --- Root Variables & Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Playfair+Display:wght@700&display=swap');

:root {
    --gold: #C9A14A;
    --gold-hover: #B08D3D;
    --dark: #1A1A1A;
    --light-bg: #F8F9FA;
    --glass: rgba(255, 255, 255, 0.95);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* --- Global Reset --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--dark);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Entrance Animation --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.admin-container, .login-container {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* --- Admin Navigation Menu --- */
/* Dashboard Grid Layout */
.admin-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.stat-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.stat-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
    box-shadow: 0 10px 30px rgba(201, 161, 74, 0.15);
}

.card-icon {
    font-size: 2rem;
}

.stat-card span {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

/* Luxury Logout Button */
.logout-wrapper {
    margin-top: 50px;
    text-align: center;
}

.btn-logout {
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom: 1px solid transparent;
    transition: 0.3s;
}

.btn-logout:hover {
    color: #e74c3c;
    border-color: #e74c3c;
}









/* --- Glassmorphism Containers --- */
.admin-container {
    background: var(--glass);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.05);
    margin: 20px auto;
    max-width: 1200px;
    padding: 40px !important;
}

h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--gold);
}

/* --- Forms & Inputs --- */
.admin-form, form {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    margin-bottom: 30px;
}

input, select, textarea {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 161, 74, 0.1);
}

/* --- Buttons --- */
.btn-update, button[type="submit"] {
    background: var(--dark);
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-update:hover, button[type="submit"]:hover {
    background: var(--gold);
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(201, 161, 74, 0.3);
}

/* --- Luxury Styled Table --- */
.styled-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    margin-top: 20px;
}

.styled-table thead tr {
    background-color: var(--dark);
    color: #ffffff;
}

.styled-table th {
    padding: 18px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.styled-table td {
    background: #fff;
    padding: 15px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.styled-table tr:hover td {
    background: #fdfdfd;
    transform: scale(1.005);
    box-shadow: var(--shadow);
}

/* --- Portfolio Grid --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.portfolio-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid #eee;
}

.portfolio-card:hover {
    transform: translateY(-10px);
}

.portfolio-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-card:hover img {
    transform: scale(1.05);
}

/* --- Status Badges --- */
.status-badge {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.pending { background: #FFF4E5; color: #B08D3D; }
.status-badge.approved { background: #E8F5E9; color: #2E7D32; }
.status-badge.rejected { background: #FFEBEE; color: #C62828; }

/* --- Login Page Specific --- */
.login-page {
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: #fff;
    width: 100%;
    max-width: 400px;
    padding: 50px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.login-container h2 {
    margin-bottom: 30px;
    color: var(--dark);
}

.login-container input {
    width: 100%;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.login-container button {
    width: 100%;
    background: var(--gold);
}

.delete-btn {
    color: #e74c3c;
    font-size: 0.85rem;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.delete-btn:hover {
    border-color: #e74c3c;
    opacity: 0.8;
}

/* --- ADVANCED ADMIN MOBILE OVERRIDES --- */

@media (max-width: 768px) {
    /* 1. Global Spacing & Layout */
    .admin-container {
        padding: 20px 15px !important;
        margin: 10px;
        border-radius: 8px;
    }

    h2 {
        font-size: 1.6rem;
        text-align: center;
        display: block;
    }

    h2::after {
        left: 50%;
        transform: translateX(-50%);
    }

    /* 2. Responsive Dashboard Grid */
    .admin-card-grid {
        grid-template-columns: 1fr; /* Single column for thumbs */
        gap: 15px;
    }

    .stat-card {
        flex-direction: row; /* Horizontal cards are easier to tap */
        padding: 20px;
        justify-content: flex-start;
        gap: 20px;
        /* Animation: Slide in from the side */
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .stat-card.visible {
        opacity: 1;
        transform: translateX(0);
    }

    .stat-card:active {
        transform: scale(0.97); /* Tactile feedback */
        background: #fcfcfc;
    }

    /* 3. Table Swiping Logic */
    .styled-table {
        display: block;
        width: 100%;
        overflow-x: auto; /* Enable horizontal scrolling for wide data */
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* Add a hint for mobile users */
    .admin-container::before {
        content: "← Swipe table to view data →";
        display: block;
        font-size: 0.65rem;
        color: #999;
        text-align: center;
        margin-bottom: 10px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    /* 4. Form & Input Optimization */
    .admin-form, form {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .admin-form input, 
    .admin-form select, 
    .admin-form button {
        width: 100% !important;
        margin: 0 !important;
    }

    /* 5. Portfolio Grid Adjustments */
    .portfolio-grid {
        grid-template-columns: 1fr; /* One large photo per row */
        gap: 20px;
    }

    .portfolio-card {
        /* Animation: Scale up from bottom */
        opacity: 0;
        transform: translateY(20px) scale(0.95);
        transition: all 0.7s ease-out;
    }

    .portfolio-card.visible {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    /* 6. Login Page Centering */
    .login-container {
        width: 90%;
        padding: 30px 20px;
        margin: 0 15px;
    }
}

/* Extra Small Device Tweaks */
@media (max-width: 480px) {
    .status-badge {
        font-size: 0.65rem;
        padding: 4px 8px;
    }
    
    .btn-update {
        padding: 15px 10px; /* Larger hit area for mobile buttons */
    }
}