/* Modern Teal Design System */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #14b8a6;
    /* Teal-500 */
    --primary-dark: #0f766e;
    /* Teal-700 */
    --primary-light: #99f6e4;
    /* Teal-200 */
    --secondary-color: #f3f4f6;
    /* Gray-100 */
    --text-color: #1f2937;
    /* Gray-800 */
    --text-muted: #6b7280;
    /* Gray-500 */
    --bg-color: #f0fdfa;
    /* Teal-50 */
    --card-bg: #ffffff;
    --border-radius: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(20, 184, 166, 0.1), 0 4px 6px -2px rgba(20, 184, 166, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(20, 184, 166, 0.1), 0 4px 6px -2px rgba(20, 184, 166, 0.05);
    --primary-gradient: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    --admin-bg-light: #ecf0f5;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--admin-bg-light);
    /* background-image: url('/images/bg-pattern.png'), url('/images/bg-gradient.png'); */
    /* background-repeat: repeat, no-repeat; */
    /* background-attachment: fixed, fixed; */
    /* background-size: 400px, cover; */
    /* background-blend-mode: multiply; */
    /* Blends pattern into gradient */
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 80px;
    /* Space for fixed footer */
}

main {
    flex: 1 0 auto;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    flex-shrink: 0;
    background: white;
    padding: 1rem 0;
    margin-top: auto;
    border-top: 1px solid #e5e7eb !important;
    text-align: center;
    font-size: 0.9rem;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.02);
}

/* Titles & Headers */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-color);
    font-weight: 700;
}

.page-title {
    color: var(--primary-dark);
    font-weight: 800;
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* Modern Card */
.card-modern {
    background: var(--card-bg);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.03), 0 10px 10px -5px rgba(0, 0, 0, 0.02));
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: visible;
}

.card-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header-modern {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    font-size: 1.25rem;
}

/* Forms */
.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-label.required::after {
    content: "*";
    color: #ef4444;
    margin-right: 4px;
}

.form-control,
.form-select {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f9fafb;
}

.form-select {
    padding-left: 2.5rem;
    background-position: .75rem center;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 16px 12px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
}

/* Image Upload Preview */
.image-upload-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: var(--shadow-lg);
    background-color: #e5e7eb;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.image-upload-container:hover {
    transform: scale(1.05);
}

.image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-upload-trigger {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 100%;
    text-align: center;
    padding: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-upload-container:hover .btn-upload-trigger {
    opacity: 1;
}

/* Buttons */
.btn-modern {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-modern:hover {
    filter: brightness(110%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-modern-outline {
    background: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--primary-color);
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-modern-outline:hover {
    background: var(--bg-color);
    color: var(--primary-dark);
}

/* Table Styles for Index Page */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.8rem;
}

.table-modern thead th {
    background: transparent;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    padding: 1rem;
    border: none;
}

.table-modern tbody tr {
    background: white;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.table-modern tbody tr:hover {
    transform: scale(1.01);
}

.table-modern td:first-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.table-modern td:last-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.table-modern td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
    border: none;
}

/* Pagination */
.pagination .page-item .page-link {
    border: none;
    border-radius: 8px;
    margin: 0 4px;
    color: var(--primary-dark);
    font-weight: 600;
}

.pagination .page-item.active .page-link {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}