/* =========================
   Global
========================= */
* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

body {
    margin: 0;
    background: linear-gradient(135deg, #eef2ff, #f8fafc);
    color: #1f2937;
    direction: ltr;
    text-align: left;
}

label {
    text-align: left;
}

input,
textarea {
    text-align: left;
}

/* =========================
   Navbar
========================= */
nav ul {
    list-style: none;
    margin: 0;
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

nav ul li {
    display: inline-block;
}

nav a {
    text-decoration: none;
    color: #2563eb;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 999px;
    transition: all .3s ease;
}

nav a:hover {
    background: rgba(37,99,235,0.1);
}

/* =========================
   Small Buttons (Operations)
========================= */
.ops {
    white-space: nowrap;
    text-align: center;
}

.btn-sm {
    padding: 4px 6px;
    font-size: 13px;
    margin: 0 2px;
    display: inline-block;
}

/* =========================
   Container
========================= */
.container {
    max-width: 1150px;
    margin: 35px auto;
    padding: 30px;

    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(14px);
    border-radius: 18px;

    box-shadow:
        0 20px 40px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.6);
}

/* =========================
   Titles
========================= */
.page-title {
    text-align: center;
    font-size: 30px;
    color: #1e40af;
    margin-bottom: 25px;
}

/* =========================
   Controls
========================= */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 25px;
}

/* =========================
   Inputs
========================= */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
    padding: 11px 14px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.15);
    outline: none;
    font-size: 14px;
    background: rgba(255,255,255,0.9);
}

input:focus,
select:focus,
textarea:focus {
    border-color: #2563eb;
}

/* =========================
   Buttons
========================= */
.btn,
button {
    padding: 10px 18px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;

    color: #1e3a8a;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.9),
        rgba(219,234,254,0.9)
    );

    backdrop-filter: blur(8px);
    box-shadow:
        0 8px 20px rgba(37,99,235,0.2),
        inset 0 1px 0 rgba(255,255,255,0.8);

    transition: all .25s ease;
}

.btn:hover,
button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(37,99,235,0.35);
}

/* Edit */
.btn-edit {
    color: #065f46;
    background: linear-gradient(
        135deg,
        rgba(236,253,245,0.9),
        rgba(167,243,208,0.9)
    );
}

/* Delete */
.btn-delete,
.danger {
    color: #7f1d1d;
    background: linear-gradient(
        135deg,
        rgba(254,226,226,0.95),
        rgba(252,165,165,0.95)
    );
}

/* =========================
   Search
========================= */
.search-form {
    display: flex;
    gap: 10px;
}



/* =========================
   grid
========================= */
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 22px;
    margin-top: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group input {
    padding: 9px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
}

/* الأزرار تمتد بعرض الفورم */
.form-actions {
    grid-column: span 3;
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}




/* =========================
   Table
========================= */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;

    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    overflow: hidden;

    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

thead {
    background: rgba(219,234,254,0.7);
}

th,
td {
    padding: 14px;
    text-align: center;
}

th {
    font-weight: 700;
    color: #1e40af;
}

tbody tr {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

tbody tr:hover {
    background: rgba(239,246,255,0.6);
}

/* =========================
   Actions
========================= */
.actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================
   Responsive
========================= */
@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form {
        flex-direction: column;
    }
}
