/* ===========================================
   IERA Admin Panel Styles
   Premium dark theme with glassmorphism
   =========================================== */

/* Base Admin Section */
.admin-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
    padding: 2rem 0 4rem;
    font-family: 'Urbanist', sans-serif;
}

.admin-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #8b45e5, #d946ef);
    top: -150px;
    right: -100px;
    animation: float 10s ease-in-out infinite;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #d946ef, #8b45e5);
    bottom: 10%;
    left: -100px;
    animation: float 12s ease-in-out infinite reverse;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #00ff88, #8b45e5);
    top: 50%;
    left: 60%;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-30px) scale(1.05);
    }
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}

/* Header Styles */
.admin-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.header-content {
    flex: 1;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(139, 69, 229, 0.2);
    border: 1px solid rgba(139, 69, 229, 0.3);
    border-radius: 50px;
    color: #d946ef;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.admin-title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.admin-title .gradient-text {
    background: linear-gradient(135deg, #8b45e5 0%, #d946ef 50%, #ff6b9d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-subtitle {
    font-size: 1rem;
    color: #94a3b8;
    line-height: 1.5;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1.5rem;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
}

.back-link:hover {
    color: #d946ef;
    background: rgba(139, 69, 229, 0.1);
    border-color: rgba(139, 69, 229, 0.3);
    transform: translateX(-4px);
    text-decoration: none;
}

/* Buttons */
.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Urbanist', sans-serif;
}

.admin-btn-primary {
    background: linear-gradient(135deg, #8b45e5 0%, #d946ef 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 69, 229, 0.3);
}

.admin-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 69, 229, 0.5);
    filter: brightness(1.1);
    color: white;
    text-decoration: none;
}

.admin-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(139, 69, 229, 0.3);
}

.admin-btn-secondary:hover {
    background: rgba(139, 69, 229, 0.15);
    border-color: rgba(139, 69, 229, 0.5);
    color: white;
    text-decoration: none;
}

.admin-btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.admin-btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    text-decoration: none;
}

.admin-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* Alerts */
.admin-alert {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid;
}

.admin-alert-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.admin-alert-error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.admin-alert-info {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.alert-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.admin-alert-success .alert-icon {
    background: rgba(16, 185, 129, 0.2);
}

.admin-alert-error .alert-icon {
    background: rgba(239, 68, 68, 0.2);
}

/* Card Styles */
.admin-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.admin-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.admin-card-body {
    padding: 1.5rem;
}

.admin-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.1);
    text-align: center;
}

.admin-card-footer-text {
    color: #64748b;
    font-size: 0.85rem;
}

/* Table Styles */
.admin-table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table td {
    padding: 1rem 1.25rem;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.admin-table tr:hover td {
    background: rgba(139, 69, 229, 0.05);
}

.admin-table tr.past {
    opacity: 0.6;
}

/* Table Cell Components */
.table-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.table-date-badge {
    min-width: 48px;
    padding: 0.5rem;
    background: linear-gradient(135deg, rgba(139, 69, 229, 0.2), rgba(217, 70, 239, 0.1));
    border: 1px solid rgba(139, 69, 229, 0.2);
    border-radius: 10px;
    text-align: center;
}

.table-date-month {
    font-size: 0.65rem;
    font-weight: 700;
    color: #d946ef;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-date-day {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.table-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139, 69, 229, 0.3), rgba(217, 70, 239, 0.2));
    border: 1px solid rgba(139, 69, 229, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #d946ef;
}

.table-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.table-info-title {
    font-weight: 600;
    color: #ffffff;
}

.table-info-subtitle {
    font-size: 0.8rem;
    color: #64748b;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-badge-secondary {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.status-badge-primary {
    background: rgba(139, 69, 229, 0.15);
    color: #c084fc;
    border: 1px solid rgba(139, 69, 229, 0.3);
}

.status-badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Table Actions */
.table-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Form Styles */
.admin-form-group {
    margin-bottom: 1.25rem;
}

.admin-form-label {
    display: block;
    font-weight: 600;
    color: #ffffff;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.admin-form-label .required {
    color: #f87171;
    margin-left: 0.25rem;
}

.admin-form-input,
.admin-form-textarea,
.admin-form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(139, 69, 229, 0.2);
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: 'Urbanist', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.admin-form-input::placeholder,
.admin-form-textarea::placeholder {
    color: #64748b;
}

.admin-form-input:focus,
.admin-form-textarea:focus,
.admin-form-select:focus {
    outline: none;
    border-color: #8b45e5;
    box-shadow: 0 0 0 3px rgba(139, 69, 229, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.admin-form-textarea {
    resize: vertical;
    min-height: 120px;
}

.admin-form-help {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #64748b;
}

.admin-form-error {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #f87171;
}

/* Switch */
.admin-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.admin-switch-input {
    width: 48px;
    height: 26px;
    appearance: none;
    background: rgba(100, 116, 139, 0.3);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.admin-switch-input::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.admin-switch-input:checked {
    background: linear-gradient(135deg, #8b45e5, #d946ef);
}

.admin-switch-input:checked::before {
    left: 25px;
}

.admin-switch-label {
    color: #e2e8f0;
    font-size: 0.9rem;
}

/* Form Row Grid */
.admin-form-row {
    display: grid;
    gap: 1rem;
}

.admin-form-row-2 {
    grid-template-columns: repeat(2, 1fr);
}

.admin-form-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {

    .admin-form-row-2,
    .admin-form-row-3 {
        grid-template-columns: 1fr;
    }
}

/* Form Actions */
.admin-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Delete Confirmation */
.delete-warning {
    text-align: center;
    padding: 1.5rem;
}

.delete-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 50%;
    color: #f87171;
}

.delete-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.delete-subtitle {
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

.delete-preview {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.delete-preview-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

.delete-preview-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.delete-preview-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.delete-preview-item svg {
    color: #64748b;
    flex-shrink: 0;
}

/* Image Preview */
.image-preview {
    max-width: 200px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.75rem;
}

/* File Input */
.admin-file-input {
    position: relative;
}

.admin-file-input input[type="file"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(139, 69, 229, 0.3);
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-file-input input[type="file"]:hover {
    border-color: rgba(139, 69, 229, 0.5);
    background: rgba(139, 69, 229, 0.05);
}

.admin-file-input input[type="file"]::file-selector-button {
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    background: linear-gradient(135deg, #8b45e5, #d946ef);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-file-input input[type="file"]::file-selector-button:hover {
    filter: brightness(1.1);
}

/* Empty State */
.admin-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #64748b;
}

.admin-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    opacity: 0.5;
}

/* Loading State */
.admin-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    color: #94a3b8;
}

.admin-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(139, 69, 229, 0.2);
    border-top-color: #8b45e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (min-width: 768px) {
    .admin-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .admin-title {
        font-size: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .admin-section {
        padding: 3rem 0 5rem;
    }

    .admin-title {
        font-size: 2.75rem;
    }
}