/*
 * Earth Link Root - Debt Management System Styles
 *
 * This file contains base styles, layout, and responsive adjustments.
 */

:root {
    --primary-color: #093475;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --bg-light: #f8f9fa;
    --border-color: #e6e9ee;
    --font-family: 'Arial', sans-serif;
}

/* ========== Base ========== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: #343a40;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    min-height: 100vh;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: auto;
    padding: 15px;
}

/* ========== Header ========== */

.topbar {
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.logo_row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo svg {
    width: 35px;
    height: 35px;
    fill: #fff;
    margin-left: 10px;
}

.company {
    font-size: 1.4rem;
    font-weight: bold;
}

.nav a {
    color: #fff;
    text-decoration: none;
    padding: 5px 8px;
    margin: 0 3px;
    font-size: .95rem;
    white-space: nowrap;
}

.nav a:hover {
    background-color: rgba(255,255,255,.15);
    border-radius: 4px;
}

/* ========== Cards & Forms ========== */

.card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,.05);
    margin-bottom: 20px;
}

form label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
}

form input,
form select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

/* ========== Buttons ========== */

.btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    cursor: pointer;
}

.btn.small {
    padding: 6px 12px;
    font-size: .85rem;
}

/* =====================================
   🔍 SEARCH BAR – FINAL ADJUSTED
===================================== */

.search-form {
    display: flex;
    align-items: stretch;
    gap: 8px;                 /* فراغ بسيط */
    max-width: 600px;
    margin: 20px 0;
}

.search-form input[type="text"] {
    flex: 1;
    height: 46px;             /* نفس الارتفاع */
    padding: 0 14px;
    font-size: 1rem;
    border: 2px solid #cfe9f6;
    border-radius: 6px;
}

.search-form input[type="text"]:focus {
    outline: none;
    border-color: #6ec1e4;
    box-shadow: 0 0 0 3px rgba(110,193,228,.25);
}

.search-form button {
    height: 50px;             /* مطابق تمامًا */
    padding: 0 26px;
    background-color: #6ec1e4;
    color: #083044;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .25s ease;
}

.search-form button:hover {
    background-color: #56b3da;
}

/* Mobile */
@media (max-width: 500px) {
    .search-form {
        flex-direction: column;
    }
}

/* ========== Tables ========== */

.datatable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: .9rem;
}

.datatable th,
.datatable td {
    padding: 10px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.datatable th {
    background-color: #e9ecef;
    font-weight: 700;
}

/* ========== No Data Message ========== */

.no-data,
.empty-message {
    margin-top: 12px;      /* نزلناها شوي */
    margin-bottom: 4px;    /* لازكة بزر الإضافة */
    text-align: center;
    font-size: .95rem;
    color: #6c757d;
}

/* ========== Responsive Nav ========== */

@media (max-width: 900px) {
    .logo_row {
        flex-direction: column;
        align-items: flex-end;
    }

    .nav {
        margin-top: 10px;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .nav a {
        margin: 5px 3px;
        font-size: .85rem;
    }
}

