﻿:root {
    --main: #0da9a6;
    --accent: #a25be1;
    --main-footer: #1673A3;
    --accent-footer: #15445a;
    --main-dark: #003845;
    --main-light: #e0f5f4;
    --accent-light: #e0ecf6;
    --gray-bg: #f5f7fa;
    --gray: #c2c1c1;
    --gray-dark: #B5B5B5;
    --white: #fff;
    --shadow: 0 2px 12px 0 rgba(13, 169, 166, 0.09);
    --shadow-lg: 0 4px 12px 0 rgba(13, 169, 166, 0.12);
    --fs-title: 1.2rem;
    --fs-subtitle: 0.9rem;
    --fs-btn: 0.95rem;
    --fs-table: 0.95rem;
    --fs-badge: 0.92rem;
    --fs-desc: 0.92rem;
    --fs-card: 1.1rem;
    --fs-cardnum: 1.1rem;
}

html, body {
    font-size: 14px;
}
/* تصغير الخط الافتراضي للجميع */

.page-header {
    background: linear-gradient(90deg, #b39ddb 0%, #20c9a5 100%);
    color: #fff;
    border-radius: 0 0 18px 18px;
    box-shadow: var(--shadow);
    padding: 1.2rem 0 0.7rem 0;
    margin-bottom: 1.2rem;
}

    .page-header .container-fluid {
        max-width: 1080px;
        margin: 0 auto;
    }

.header-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: flex-end;
}

.page-title {
    font-size: var(--fs-title);
    font-weight: 800;
    margin-bottom: 0.2rem;
    text-shadow: 0 2px 7px rgba(0,0,0,0.10);
    color: #fff;
}

.page-subtitle {
    font-size: var(--fs-subtitle);
    color: var(--main-light);
    margin-bottom: 0;
    margin-top: 0.1rem;
    font-weight: 400;
    text-shadow: 0 1.5px 4px rgba(0,0,0,0.04);
}

/* Buttons */
.header-btns {
    display: flex;
    flex-direction: row;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 0.1rem;
}

.tbinside-btn {
    border: none;
    border-radius: 30px;
    padding: 0.4rem 0.4rem; /* قلّل فقط قليلاً */
    font-weight: 700;
    font-size: 0.8rem; /* حجم خط معتاد وجميل */
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 1px 8px rgba(13,169,166,0.08);
    cursor: pointer;
    transition: all 0.17s;
    text-decoration: none;
    outline: none;
    background: linear-gradient(94deg, #0da9a6, #2DADE0 95%);
}

    .tbinside-btn:hover {
        background: linear-gradient(100deg, #2DADE0, #0da9a6 95%);
        transform: translateY(-2px) scale(1.06);
        color: #fff !important;
    }

.tbinside-btns:hover {
    background: linear-gradient(100deg, #2DADE0, #0da9a6 95%);
    transform: translateY(-2px) scale(1.06);
    color: #fff !important;
}

.export-btn, .scan-btn, .update-btn, .return-btn {
    border: none;
    border-radius: 30px;
    padding: 0.48rem 1.1rem;
    font-weight: 700;
    font-size: var(--fs-btn);
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 1px 8px rgba(13,169,166,0.08);
    cursor: pointer;
    transition: all 0.17s;
    text-decoration: none;
    outline: none;
}

/* زر التصدير */
.export-btn {
    background: linear-gradient(94deg, #c1b489, #d4c9a8 95%);
}

    .export-btn:hover {
        background: linear-gradient(100deg, #d4c9a8, #c1b489 95%);
        transform: translateY(-2px) scale(1.06);
        color: #fff !important;
    }
/* زر العودة */
.return-btn {
    background: linear-gradient(94deg, #B5B5B5, #c2c1c1 95%);
}

    .return-btn:hover {
        background: linear-gradient(100deg, #c2c1c1, #B5B5B5 95%);
        transform: translateY(-2px) scale(1.06);
        color: #fff !important;
    }

/* زر الفحص (كما هو سابقًا) */
.scan-btn {
    background: linear-gradient(94deg, #0da9a6, #2DADE0 95%);
}

    .scan-btn:hover {
        background: linear-gradient(100deg, #2DADE0, #0da9a6 95%);
        transform: translateY(-2px) scale(1.06);
        color: #fff !important;
    }

/* زر التحديث الجديد */
.update-btn {
    background: linear-gradient(94deg, #07a869, #0da9a6 95%);
    /* أخضر - تيل (هوية وزارة التعليم) */
}

    .update-btn:hover {
        background: linear-gradient(100deg, #0da9a6, #07a869 95%);
        transform: translateY(-2px) scale(1.06);
        color: #fff !important;
    }

/* Cards */
.stats-card {
    border-radius: 14px;
    box-shadow: var(--shadow);
    margin-bottom: 1.1rem;
    color: #fff;
    background: linear-gradient(99deg, var(--main) 0%, var(--accent) 100%);
    transition: transform 0.14s;
    font-size: var(--fs-card);
}

    .stats-card.bg-gradient-success {
        background: linear-gradient(99deg,#07a869,#003845 95%);
    }

    .stats-card.bg-gradient-info {
        background: linear-gradient(99deg,#2DADE0,#1673A3 95%);
    }

    .stats-card.bg-gradient-primary {
        background: linear-gradient(99deg,#725AA4,#15445a 95%);
    }

    .stats-card.bg-gradient-warning {
        background: linear-gradient(99deg,#c1b489,#15445a 95%);
    }

    .stats-card:hover {
        transform: translateY(-4px) scale(1.02);
        box-shadow: 0 7px 20px 0 rgba(13,169,166,0.13);
    }

    .stats-card .card-body {
        padding: 0.8rem 0.7rem 0.7rem 0.7rem;
    }

.stats-number {
    font-size: var(--fs-cardnum);
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.stats-label {
    font-size: 0.92rem;
    font-weight: 500;
    color: #e0f5f4;
}

/* Area Section */
.area-section {
    margin-bottom: 1.3rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border: 1.1px solid var(--gray);
    overflow: hidden;
    transition: box-shadow 0.13s, border 0.13s;
}

    .area-section:hover {
        box-shadow: 0 6px 18px rgba(13,169,166,0.11);
        border-color: var(--main-light);
    }

.area-header {
    background: linear-gradient(90deg, var(--main-dark) 0%, var(--main) 100%);
    color: #fff;
    padding: 0.5rem 1.1rem;
    border-bottom: none;
}

.area-title {
    font-size: 0.99rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.area-badge {
    background: rgba(255,255,255,0.18);
    color: #fff;
    padding: 0.22rem 0.8rem;
    border-radius: 10px;
    font-size: var(--fs-badge);
    font-weight: 700;
    border: 1px solid var(--main-light);
    margin-right: 0.4rem;
}

.area-footer {
    box-shadow: var(--shadow);
    margin-bottom: 1.1rem;
    color: #fff;
    background: linear-gradient(99deg, var(--main-footer) 0%, var(--accent-footer) 100%);
    transition: transform 0.14s;
    font-size: var(--fs-card);
    border-radius: 5px;
    font-size: var(--fs-badge);
    font-weight: 700;
    border: 1px solid var(--main-dark);
}
/* Table */
.controllers-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--gray-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 7px rgba(13,169,166,0.04);
    font-size: var(--fs-table);
}

    .controllers-table thead th {
        background: linear-gradient(90deg, var(--main-light) 60%, var(--accent-light) 100%);
        color: var(--main-dark);
        font-weight: bold;
        font-size: 0.96rem;
        padding: 0.6rem 0.4rem;
        text-align: center;
        border-bottom: 1.5px solid var(--main);
        border-top: none;
        letter-spacing: 0.2px;
    }

    .controllers-table tbody tr {
        background: #fff;
        border-bottom: 1px solid var(--gray);
        transition: box-shadow 0.11s, background 0.11s;
    }

        .controllers-table tbody tr:hover {
            background: var(--main-light);
            box-shadow: 0 1px 5px 0 rgba(13,169,166,0.06);
        }

    .controllers-table tbody td {
        padding: 0.45rem 0.36rem;
        vertical-align: middle;
        text-align: center;
        font-size: 0.95rem;
        color: var(--main-dark);
        border-bottom: 1px solid var(--gray);
    }

    .controllers-table tbody tr:last-child td {
        border-bottom: none;
    }

/* Table Badges & Names */
.row-number {
    background: var(--accent);
    color: #fff;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.80rem;
    box-shadow: 0 1px 4px rgba(61,126,185,0.09);
}

.controller-name {
    color: var(--main-dark);
    font-weight: 700;
    font-size: 0.92rem;
    background: var(--main-light);
    padding: 0.22rem 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--gray);
    display: inline-block;
}

.action-name {
    background: linear-gradient(90deg, #6ACEE2, #2DADE0 100%);
    color: var(--accent);
    padding: 0.22rem 0.6rem;
    border-radius: 6px;
    font-family: 'Cascadia Mono', 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.89rem;
    display: inline-block;
    border: 1px solid var(--gray);
}

.permission-badge {
    background: var(--main-light);
    color: var(--main-dark);
    padding: 0.16rem 0.53rem;
    border-radius: 6px;
    font-size: 0.91rem;
    font-weight: 700;
    border: 1px solid var(--gray);
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-permission {
    color: var(--accent);
    font-style: italic;
    opacity: 0.75;
    font-size: 0.89rem;
}

.description-text {
    text-align: right;
    padding: 0.17rem 0.4rem;
    background: var(--main-light);
    border-radius: 6px;
    color: var(--main-dark);
    line-height: 1.45;
    font-size: var(--fs-desc);
    border: 1px dashed var(--gray);
    font-style: italic;
}

.edit-btn {
    background: linear-gradient(94deg, var(--accent), var(--main-dark) 90%);
    border: none;
    color: #fff !important;
    padding: 0.26rem 0.8rem;
    border-radius: 20px;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 0.93rem;
    box-shadow: 0 1px 6px rgba(13,169,166,0.08);
}

    .edit-btn:hover {
        background: linear-gradient(100deg, var(--main-dark), var(--accent));
        transform: translateY(-1px) scale(1.04);
        color: #fff !important;
        text-decoration: none;
    }

/* Empty state & Alerts */
.empty-state {
    text-align: center;
    padding: 2.3rem 1.2rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin: 1.5rem 0;
    border: 1px solid var(--main-light);
}

.empty-state-icon {
    color: var(--main);
    margin-bottom: 1.2rem;
    font-size: 2.1rem;
}

.empty-state h5 {
    color: var(--main-dark);
    margin-bottom: 0.7rem;
    font-size: 1rem;
    font-weight: 700;
}

.empty-state p {
    color: var(--accent);
    font-size: 0.93rem;
    margin-bottom: 1.1rem;
}

.alert-custom {
    background: linear-gradient(90deg, #e0f5f4 0%, #e0ecf6 100%);
    border: 1.2px solid var(--main-light);
    border-radius: 10px;
    padding: 0.7rem;
    color: var(--main-dark);
    font-size: 0.89rem;
    margin-top: 0.8rem;
}

.alert-success-custom {
    background: linear-gradient(135deg, #e6f7ef 0%, #b3e6d0 100%);
    border: 1.2px solid #07a869;
    color: #003845;
    font-size: 0.91rem;
}

.alert-danger-custom {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1.2px solid #f87171;
    color: #7f1d1d;
    font-size: 0.91rem;
}

/* Responsive */
@media (max-width: 991.98px) {
    .header-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .header-btns {
        justify-content: flex-start;
    }

    .page-title {
        font-size: 1.02rem;
    }
}

@media (max-width: 600px) {
    .page-title {
        font-size: 0.93rem;
    }

    .area-header {
        padding: 0.38rem 0.3rem;
    }

    .header-btns {
        flex-direction: column;
        width: 100%;
    }

    .export-btn, .scan-btn .update-btn {
        width: 100%;
    }
}

/* ========== أنماط إضافية جديدة ========== */

/* Container Custom */
.container-custom {
    max-width: 850px;
    margin: 0 auto;
}

/* Page Header Icon */
.page-header-icon {
    font-size: 1.8rem;
}

/* Alert Custom Styles */
.alert-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--main) 0%, var(--accent) 100%);
}

.alert-icon {
    color: var(--main);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.alert-title {
    color: var(--main-dark);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.alert-content {
    background: linear-gradient(135deg, var(--main-light) 0%, var(--accent-light) 100%);
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid var(--main);
    margin-top: 0.8rem;
}

.alert-text {
    color: var(--main-dark);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

    .alert-text:last-child {
        margin-bottom: 0;
    }

    .alert-text hr {
        margin: 0.8rem 0;
        border: none;
        border-top: 1px dashed var(--main);
    }

/* Highlight and Time Badges */
.highlight-date {
    background: white;
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-weight: 700;
    display: inline-block;
    margin: 0.3rem 0;
    border: 1.5px solid var(--main);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    font-size: 0.9rem;
}

.time-badge {
    background: linear-gradient(135deg, var(--main) 0%, var(--main-dark) 100%);
    color: white;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-block;
    margin: 0 0.2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
}

/* Documents Section */
.documents-section {
    background: white;
    border-radius: 10px;
    padding: 1.2rem;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--gray);
}

.documents-title {
    color: var(--main-dark);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Document Card */
.document-card {
    background: linear-gradient(135deg, var(--main-light) 0%, white 100%);
    border: 2px solid var(--main);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

    .document-card:last-child {
        margin-bottom: 0;
    }

    .document-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
        background: linear-gradient(135deg, var(--main) 0%, var(--accent) 100%);
        color: white;
    }

        .document-card:hover .document-icon {
            color: white;
            transform: scale(1.08);
        }

        .document-card:hover .document-title {
            color: white;
        }

.document-icon {
    font-size: 2rem;
    color: var(--main);
    transition: all 0.3s ease;
}

.document-info {
    flex: 1;
}

.document-title {
    color: var(--main-dark);
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    transition: all 0.3s ease;
}

.document-subtitle {
    color: var(--gray-dark);
    font-size: 0.8rem;
    margin: 0.2rem 0 0 0;
}

.document-card:hover .document-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.arrow-icon {
    font-size: 1.3rem;
    color: var(--main);
    transition: all 0.3s ease;
}

.document-card:hover .arrow-icon {
    color: white;
    transform: translateX(-5px);
}

/* Responsive للأنماط الجديدة */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.1rem;
    }

    .alert-text {
        font-size: 0.85rem;
    }

    .document-card {
        flex-direction: column;
        text-align: center;
    }

    .time-badge, .highlight-date {
        font-size: 0.8rem;
    }
}
