:root {
    --chinese-black: #0C1519;
    --dark-jungle-green: #162127;
    --jet: #3A3534;
    --antique-brass: #CF9D7B;
    --coffee: #724B39;
    --light-red: #ff9999;
    --light-green: #99ff99;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Noto Kufi Arabic', sans-serif;
}

body {
    background-color: var(--chinese-black);
    color: var(--antique-brass);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.container {
    width: 100%;
    max-width: 900px;
    margin-top: 20px;
}

h1 {
    text-align: center;
    color: var(--antique-brass);
    font-size: 2.5rem;
    margin-bottom: 30px;
    letter-spacing: 1px;
    font-weight: 800;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--antique-brass);
    border-bottom: 2px solid var(--coffee);
    padding-bottom: 10px;
    display: inline-block;
}

.card {
    background-color: var(--dark-jungle-green);
    border: 1px solid var(--coffee);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #E0E0E0;
}

input {
    background-color: var(--jet);
    border: 1px solid var(--coffee);
    color: #FFFFFF;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

input:focus {
    border-color: var(--antique-brass);
    box-shadow: 0 0 8px rgba(207, 157, 123, 0.3);
}

.submit-btn {
    grid-column: span 2;
    background-color: var(--antique-brass);
    color: var(--chinese-black);
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    margin-top: 10px;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

th, td {
    padding: 16px 8px;
    border-bottom: 1px solid var(--jet);
}

th {
    color: var(--antique-brass);
    font-weight: 600;
    font-size: 1rem;
}

td {
    color: #FFFFFF;
    font-size: 0.95rem;
}

.action-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}

.view-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.view-btn:active {
    transform: scale(0.8);
}

.status-btn {
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    min-width: 90px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.status-out { background-color: var(--light-red); color: var(--chinese-black); }
.status-returned { background-color: var(--light-green); color: var(--chinese-black); }

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

.page-btn {
    background-color: var(--jet);
    color: white;
    border: 1px solid var(--coffee);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-info {
    color: var(--antique-brass);
    font-weight: 600;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-box {
    background: var(--dark-jungle-green);
    border: 2px solid var(--antique-brass);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    width: 100%;
    max-width: 350px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.modal-btns {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-weight: 800;
    cursor: pointer;
}

.btn-yes { background: var(--light-green); color: var(--chinese-black); }
.btn-no { background: var(--jet); color: white; }
.btn-delete:active { transform: scale(0.9); }

#screenshotContent {
    background: var(--chinese-black);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--coffee);
    margin-bottom: 20px;
    text-align: right;
}

.screenshot-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    border-bottom: 1px dashed #444;
    padding-bottom: 5px;
}

@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; }
    .submit-btn { grid-column: span 1; }
    .card { padding: 15px; }
    th, td { padding: 12px 4px; font-size: 0.7rem; }
    .action-cell { gap: 6px; }
    .status-btn { min-width: 75px; font-size: 0.65rem; padding: 6px 8px; }
    .view-btn { font-size: 1rem; }
}

.lock-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--chinese-black);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.lock-box {
    background: var(--dark-jungle-green);
    padding: 40px;
    border-radius: 20px;
    border: 2px solid var(--antique-brass);
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}