/* ====================================================================
   UNIFIED DESIGN SYSTEM - Additional Components
   This extends the base style.css with modern components
   ==================================================================== */

/* ======================== Modern Cards ======================== */
.modern-card {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid #374151;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    border-color: var(--primary);
}

/* ======================== Grid Systems ======================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ======================== Statistics Cards ======================== */
.stat-card {
    background: linear-gradient(135deg, var(--card-bg), #0f172a);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #334155;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary);
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card.success .stat-value {
    color: var(--success);
}

.stat-card.warning .stat-value {
    color: var(--warning);
}

.stat-card.danger .stat-value {
    color: var(--danger);
}

/* ======================== Enhanced Buttons ======================== */
.btn-lg {
    padding: 15px 30px;
    font-size: 1.1em;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85em;
}

.btn-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    transition: all 0.3s;
}

.btn-gradient:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* ======================== Page Headers ======================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #334155;
    flex-wrap: wrap;
    gap: 15px;
}

.page-title {
    font-size: 2em;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title-icon {
    font-size: 1.2em;
}

/* ======================== Info Boxes ======================== */
.info-box {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid;
}

.info-box.info {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: var(--primary);
    color: #93c5fd;
}

.info-box.success {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: var(--success);
    color: #6ee7b7;
}

.info-box.warning {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: var(--warning);
    color: #fcd34d;
}

.info-box.danger {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: var(--danger);
    color: #fca5a5;
}

/* ======================== Badges ======================== */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.primary {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.badge.success {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.badge.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.badge.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* ======================== Loading States ======================== */
.skeleton {
    background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ======================== Quick Actions Bar ======================== */
.quick-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.quick-action-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #1f2937, #111827);
    border: 1px solid #374151;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--text-color);
}

.quick-action-btn:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
}

.quick-action-icon {
    font-size: 2em;
    display: block;
    margin-bottom: 8px;
}

.quick-action-label {
    font-size: 0.9em;
    font-weight: 600;
}

/* ======================== Enhanced Tables ======================== */
.modern-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
}

.modern-table thead {
    background: linear-gradient(135deg, #1e3a8a, #1e293b);
}

.modern-table th {
    padding: 15px;
    text-align: right;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.modern-table td {
    padding: 15px;
    border-bottom: 1px solid #334155;
}

.modern-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

.modern-table tbody tr:last-child td {
    border-bottom: none;
}

/* ======================== Pagination ======================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 20px;
    background: var(--card-bg);
    border: 1px solid #374151;
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
}

.pagination-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ======================== Forms Enhancement ======================== */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9em;
    font-weight: 500;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #374151;
    border-radius: 8px;
    color: var(--text-color);
    transition: all 0.3s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ======================== Select Dropdowns Fix ======================== */
/* Fix for dropdown menu visibility */
select {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #374151;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1em;
    cursor: pointer;
}

select option {
    background: #1e293b;
    color: #ffffff;
    padding: 10px 15px;
    font-size: 1em;
    font-weight: 500;
}

select option:hover,
select option:focus,
select option:checked {
    background: #3b82f6;
    color: #ffffff;
}

/* Additional styling for optgroup */
select optgroup {
    background: #0f172a;
    color: #94a3b8;
    font-weight: bold;
}

/* Make dropdown arrow more visible */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
    padding-left: 40px;
}