/* ===== CSS Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* Fallback background color (dark) */
    background-color: #1a1a1a;
    /* Banner image */
    background-image: url('../assets/banner.jpeg');
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ===== Container / Card ===== */
.container {
    max-width: 900px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Typography ===== */
h1 {
    font-size: 2.2rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #4361ee, #3a0ca3);
    border-radius: 2px;
}

/* ===== Alerts ===== */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert.success {
    background: #d1fae5;
    color: #065f46;
    border-left: 5px solid #10b981;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 5px solid #ef4444;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 8px;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="file"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="file"]:focus {
    outline: none;
    border-color: #4361ee;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.15);
}

input[type="file"] {
    padding: 10px;
    background: #f8fafc;
}

/* ===== Buttons ===== */
.btn, button {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
    display: inline-block;
    text-decoration: none;
    letter-spacing: 0.5px;
    /* Ensure touch target size */
    min-height: 44px;
    min-width: 44px;
    text-align: center;
}

.btn:hover, button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(67, 97, 238, 0.4);
    background: linear-gradient(135deg, #3a0ca3, #4361ee);
}

.btn.approve {
    background: linear-gradient(135deg, #4cc9f0, #4895ef);
    box-shadow: 0 8px 20px rgba(76, 201, 240, 0.3);
}

.btn.reject {
    background: linear-gradient(135deg, #f72585, #b5179e);
    box-shadow: 0 8px 20px rgba(247, 37, 133, 0.3);
}

.btn.back {
    background: linear-gradient(135deg, #64748b, #475569);
    box-shadow: 0 8px 20px rgba(100, 116, 139, 0.3);
}

/* ===== Table Styles ===== */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Ensure tables scroll on small screens without extra wrapper */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 16px;
    overflow: hidden;
}

/* For direct table overflow (if not wrapped) */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

th {
    background: #f8fafc;
    color: #1e293b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 18px 15px;
    text-align: left;
}

td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f1f5f9;
}

/* ===== Status Badges ===== */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

.badge.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.badge.status-approved {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.badge.status-rejected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===== Images in View Page ===== */
.images {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.images div {
    flex: 1 1 300px;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.images div:hover {
    transform: translateY(-5px);
}

.images h3 {
    color: #1e293b;
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

.images img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ===== Details Page ===== */
.details {
    background: #f8fafc;
    border-radius: 16px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.details p {
    margin: 12px 0;
    color: #334155;
    font-size: 1.1rem;
}

.details strong {
    color: #1e293b;
    width: 140px;
    display: inline-block;
}

/* ===== Action Buttons Group ===== */
.actions {
    margin: 30px 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ===== Links ===== */
a {
    color: #4361ee;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

a:hover {
    color: #3a0ca3;
    text-decoration: underline;
}

/* ===== Navigation (e.g., top-nav in dashboard) ===== */
.top-nav {
    margin: 15px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .images {
        flex-direction: column;
    }

    .details strong {
        width: 100%;
        margin-bottom: 5px;
    }

    /* Stack action buttons */
    .actions {
        flex-direction: column;
        gap: 10px;
    }

    .actions .btn {
        width: 100%;
    }
}

/* Extra small devices (phones, < 480px) */
@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .btn, button {
        padding: 12px 20px;
        font-size: 0.95rem;
        width: 100%; /* Full-width buttons on very small screens */
    }

    .top-nav {
        flex-direction: column;
    }

    .top-nav .btn {
        width: 100%;
    }

    input[type="text"],
    input[type="number"],
    input[type="password"],
    input[type="file"] {
        padding: 12px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .alert {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
}