/* --- Global Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.8)), 
                url('../img/bg.png') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 95%;
    height: 95vh;
    border: 1px solid rgba(155, 155, 155, 0.5);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: grid;
    grid-template-columns: 260px 1fr;
    grid-template-rows: 100px 1fr; /* السطر الأول للهيدر */
    gap: 0px;
    overflow: hidden;
}

/* --- Sidebar */
.sidebar {
    grid-row: 1 / 3;
    background: linear-gradient(180deg, #0f3d3e, #1c7c7d);
    padding: 20px;
    overflow-y: auto;
}

.logo img { width: 120px; display: block; margin: 0 auto 30px; }

.line-divider {
    padding: 12px; color: white; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    font-weight: bold; border-left: 3px solid #46dbc7;
    margin-top: 15px; border-radius: 0 8px 8px 0; user-select: none;
}

.sidebar ul { list-style: none; display: none; padding-left: 10px; }
.sidebar ul.show { display: block; }

.sidebar a {
    color: rgba(255, 255, 255, 0.8); text-decoration: none;
    display: flex; align-items: center; gap: 10px;
    padding: 10px; transition: 0.3s; font-size: 14px;
}

.sidebar a:hover, li.active a { color: white; background: rgba(255,255,255,0.1); border-radius: 8px; }

/* --- Header Section (Top Area) --- */
.header-content {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: 1fr auto auto; 
    align-items: center; 
    gap: 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 0 30px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-title {
    font-size: 18px;
    color: #0f3d3e;
    margin-bottom: 2px;
}

.welcome-text {
    color: #1a5d1a;
    font-size: 12px;
    font-weight: 600;
}

/* Profile Area */
.profile-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-img {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-img img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #1a5d1a;
    cursor: pointer;
}

.profile-img span {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* --- Main Content Layout --- */
.main-content {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto 1fr;
    gap: 20px;
    padding: 25px;
    overflow-y: auto;
}

/* --- Stat Cards --- */
.stat-cards {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: 0.3s;
}

.stat-cards:hover {
    transform: translateY(-5px);
}

.stat-cards.danger { border-top: 5px solid #d32f2f; }
.stat-cards.warning { border-top: 5px solid #ffa000; }
.stat-cards.success { border-top: 5px solid #388e3c; }

/* --- Table Wrapper --- */
.table-wrapper {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    grid-column: 1 / 4;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 15px;
    border-bottom: 2px solid #f0f0f0;
    color: #888;
    font-size: 11px;
    text-transform: uppercase;
}

td {
    padding: 15px;
    border-bottom: 1px solid #f9f9f9;
}

/* --- Priority & Buttons --- */
.priority-tag {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: bold;
}

.priority-tag.high { background: #ffebee; color: #c62828; }
.priority-tag.medium { background: #fff3e0; color: #ef6c00; }
.priority-tag.low { background: #e8f5e9; color: #2e7d32; }

.btn-view, .btn-resolve {
    padding: 7px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    border: none;
}

.btn-view { background: #f0f0f0; margin-right: 5px; }
.btn-resolve { background: #e3f2fd; color: #1976d2; }
.btn-resolve:hover { background: #1976d2; color: white; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: #1c7c7d; border-radius: 10px; }