@font-face {
    font-family: 'RTL United Text';
    src: url('../Tablet/RTLUnitedText-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'RTL United Text';
    src: url('../Tablet/RTLUnitedText-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'RTL United Text';
    src: url('../Tablet/RTLUnitedText-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

:root {
    --bg-dark: #090a0f;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.05);
    --primary-orange: #ff5a00;
    --primary-orange-glow: rgba(255, 90, 0, 0.4);
    --primary-orange-hover: #ff7a33;
    --highlight-bg: rgba(255, 90, 0, 0.15);
    --highlight-border: rgba(255, 90, 0, 0.3);
    --danger-red: #ff3333;
    --danger-red-hover: #ff6666;

    --text-main: #ffffff;
    --text-muted: #8b92a5;

    --glass-blur: blur(24px);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'RTL United Text', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background Ambient Glow */
.bg-glow {
    position: absolute;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--primary-orange-glow) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.6;
    animation: pulseGlow 10s infinite alternate;
}

.top-left {
    top: -20vw;
    left: -20vw;
}

.bottom-right {
    bottom: -20vw;
    right: -20vw;
    animation-delay: -5s;
}

@keyframes pulseGlow {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }

    100% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* Dashboard Container */
.dashboard-container {
    width: 95%;
    max-width: 1400px;
    height: 90%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Header */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
}

.header-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-orange);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-title span {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--text-muted);
    border-left: 1px solid var(--card-border);
    padding-left: 12px;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    flex-grow: 1;
    min-height: 0;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

/* Forms */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group .required {
    color: var(--primary-orange);
}

.form-group input,
.form-group textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--highlight-border);
    background: rgba(255, 90, 0, 0.05);
    box-shadow: 0 0 15px rgba(255, 90, 0, 0.1);
}

.form-group textarea {
    resize: none;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--primary-orange);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 90, 0, 0.3);
}

.btn-primary:hover {
    background: var(--primary-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 90, 0, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--text-muted);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: var(--text-main);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-danger {
    background: rgba(255, 51, 51, 0.1);
    color: var(--danger-red);
    border: 1px solid var(--danger-red);
}

.btn-danger:hover {
    background: var(--danger-red);
    color: #fff;
}

.btn-edit {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--card-border);
}

.btn-edit:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}

/* List Column */
.list-column {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.list-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.list-header .card-title {
    margin-bottom: 0;
}

.search-box input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--text-main);
    font-family: inherit;
    width: 250px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--text-muted);
}

.list-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 10px;
    min-height: 0;
}

/* Custom Scrollbar */
.list-wrapper::-webkit-scrollbar {
    width: 8px;
}

.list-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.list-wrapper::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 10px;
}

.list-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Table */
.donations-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.donations-table th {
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    background: var(--bg-dark);
    /* Hack for sticky header with backdrop filter */
    z-index: 10;
}

.donations-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    vertical-align: middle;
}

.donations-table tr {
    transition: var(--transition);
}

.donations-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.td-time {
    color: var(--text-muted);
    font-size: 0.9rem;
    width: 80px;
}

.td-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.td-comment {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.95rem;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.td-amount {
    font-weight: 700;
    color: var(--primary-orange);
    font-size: 1.2rem;
    width: 120px;
}

.td-actions {
    width: 180px;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.modal-overlay.hidden .modal-content {
    transform: translateY(-20px);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.new-item {
    animation: slideInTop 0.5s ease forwards, tempHighlight 10s ease forwards;
}

@keyframes slideInTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tempHighlight {
    0% {
        background: var(--highlight-bg);
        border-color: var(--highlight-border);
    }

    90% {
        background: var(--highlight-bg);
        border-color: var(--highlight-border);
    }

    100% {
        background: rgba(255, 255, 255, 0.02);
        border-color: transparent;
    }
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: center;
}

.badge-info {
    background: rgba(139, 146, 165, 0.2);
    color: var(--text-muted);
}

.badge-warning {
    background: rgba(255, 165, 0, 0.2);
    color: #ffa500;
}

.badge-success {
    background: rgba(0, 255, 0, 0.15);
    color: #4ade80;
}