/* Admin Panel Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f9ff;
}

/* Login Page Styles */
.admin-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 450px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin-bottom: 20px;
}

.login-header h1 {
    color: #0284c7;
    font-size: 28px;
    margin-bottom: 5px;
}

.login-header h2 {
    color: #666;
    font-size: 18px;
    font-weight: 400;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

.login-form label i {
    color: #0284c7;
    margin-right: 8px;
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0f2fe;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.error-message {
    color: #dc2626;
    background: #fee2e2;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: none;
    font-size: 14px;
}

.error-message.show {
    display: block;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(2, 132, 199, 0.3);
}

.btn-login i {
    margin-right: 8px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: #0284c7;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #0369a1;
}

.login-footer i {
    margin-right: 5px;
}

/* Admin Dashboard Styles */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #0c4a6e 0%, #075985 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.admin-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: #f97316;
}

.nav-link i {
    margin-right: 12px;
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-logout {
    width: 100%;
    padding: 12px;
    background: rgba(220, 38, 38, 0.2);
    color: white;
    border: 1px solid rgba(220, 38, 38, 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn-logout:hover {
    background: rgba(220, 38, 38, 0.4);
}

.btn-logout i {
    margin-right: 8px;
}

/* Main Content */
.admin-main {
    margin-left: 260px;
    flex: 1;
    background: #f0f9ff;
    min-height: 100vh;
}

.admin-header {
    background: white;
    padding: 20px 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    color: #0284c7;
    font-size: 28px;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
}

.admin-user i {
    color: #0284c7;
    font-size: 20px;
}

/* Admin Sections */
.admin-section {
    display: none;
    padding: 40px;
    animation: fadeIn 0.3s ease;
}

.admin-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.dash-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.dash-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(2, 132, 199, 0.2);
}

.dash-card i {
    font-size: 40px;
    color: #0284c7;
}

.dash-info h3 {
    font-size: 32px;
    color: #0284c7;
    margin-bottom: 5px;
}

.dash-info p {
    color: #666;
    font-size: 14px;
}

.welcome-message {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.welcome-message h2 {
    color: #0284c7;
    margin-bottom: 15px;
}

.welcome-message p {
    color: #666;
    line-height: 1.6;
}

/* Section Controls */
.section-controls {
    margin-bottom: 25px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.form-block {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-block h3 {
    margin-bottom: 15px;
    color: #0f172a;
    font-size: 18px;
}

.form-block .form-group {
    margin-bottom: 14px;
}

.form-block label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
}

.form-block input,
.form-block textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.form-block input:focus,
.form-block textarea:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(2, 132, 199, 0.3);
}

.btn-primary i {
    margin-right: 8px;
}

/* Tabs */
.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.tab-btn {
    padding: 12px 24px;
    background: white;
    color: #666;
    border: 2px solid #e0f2fe;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.tab-btn:hover {
    background: #f0f9ff;
    border-color: #0284c7;
}

.tab-btn.active {
    background: #0284c7;
    color: white;
    border-color: #0284c7;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Data Tables */
.data-table {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 15px;
    border-bottom: 1px solid #e0f2fe;
}

tbody tr:hover {
    background: #f0f9ff;
}

tbody tr:last-child td {
    border-bottom: none;
}

.btn-edit,
.btn-delete {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #0284c7;
    color: white;
}

.btn-edit:hover {
    background: #0369a1;
}

.btn-delete {
    background: #dc2626;
    color: white;
}

.btn-delete:hover {
    background: #b91c1c;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 25px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    font-size: 22px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    opacity: 0.8;
}

.modal-body {
    padding: 30px;
}

.modal-form .form-group {
    margin-bottom: 20px;
}

.modal-form label {
    display: block;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0f2fe;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.modal-form textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-form input[type="file"] {
    border: 2px dashed #0284c7;
    background: #f0f9ff;
    padding: 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 10px;
}

.modal-form input[type="file"]:hover {
    background: #e0f2fe;
    border-color: #0369a1;
}

.modal-form small {
    display: block;
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 10px;
}

.strength-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-bar-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
}

.strength-bar-fill.weak {
    width: 33%;
    background: #dc2626;
}

.strength-bar-fill.medium {
    width: 66%;
    background: #f59e0b;
}

.strength-bar-fill.strong {
    width: 100%;
    background: #10b981;
}

.strength-text {
    font-size: 13px;
    color: #666;
}

/* Security Notice */
.security-notice {
    background: #f0f9ff;
    border: 1px solid #0284c7;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    display: flex;
    align-items: start;
    gap: 10px;
}

.security-notice i {
    color: #0284c7;
    font-size: 20px;
    margin-top: 2px;
}

.security-notice p {
    margin: 0;
    color: #333;
    font-size: 14px;
}

.security-notice small {
    color: #666;
    font-size: 12px;
}

/* Timeout Warning */
.timeout-warning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.warning-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.warning-content i {
    font-size: 48px;
    color: #f59e0b;
    margin-bottom: 15px;
}

.warning-content p {
    color: #333;
    margin-bottom: 20px;
    font-size: 16px;
}

.warning-content button {
    padding: 12px 30px;
    background: #0284c7;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.warning-content button:hover {
    background: #0369a1;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.btn-save,
.btn-cancel {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white;
}

.btn-save:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
}

.btn-cancel {
    background: #e5e7eb;
    color: #333;
}

.btn-cancel:hover {
    background: #d1d5db;
}

/* OTP Input Styles */
#otpInput {
    font-size: 24px;
    text-align: center;
    letter-spacing: 10px;
    font-weight: bold;
    font-family: monospace;
}

#otpInput:focus {
    letter-spacing: 10px;
}

.otp-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    background: #f0f9ff;
    border-radius: 6px;
    font-size: 14px;
    color: #0284c7;
}

.otp-info i {
    font-size: 16px;
}

.btn-resend {
    width: 100%;
    padding: 10px;
    background: #f0f9ff;
    color: #0284c7;
    border: 2px solid #0284c7;
    border-radius: 8px;
    margin-top: 15px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-resend:hover:not(:disabled) {
    background: #0284c7;
    color: white;
}

.btn-resend:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-resend i {
    margin-right: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 80px;
    }
    
    .sidebar-header h2,
    .nav-link span {
        display: none;
    }
    
    .admin-main {
        margin-left: 80px;
    }
    
    .admin-header {
        padding: 15px 20px;
    }
    
    .admin-section {
        padding: 20px;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
}
