/* =============================================
   IEHMC Admit Card System - Global Styles
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+Devanagari:wght@400;600;700&display=swap');

:root {
    --primary: #1a237e;
    --primary-light: #3949ab;
    --secondary: #c62828;
    --accent: #ff8f00;
    --bg-light: #f5f5f5;
    --bg-dark: #1a1a2e;
    --card-bg: #ffffff;
    --text-dark: #212121;
    --text-light: #757575;
    --text-white: #ffffff;
    --success: #2e7d32;
    --danger: #c62828;
    --warning: #f57f17;
    --border: #e0e0e0;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
}

/* =============================================
   Front-End Styles
   ============================================= */

.front-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 40%, #01579b 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.front-wrapper::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><circle cx="40" cy="40" r="1" fill="rgba(255,255,255,0.03)"/></svg>') repeat;
    pointer-events: none;
    z-index: 0;
}

.front-wrapper > * {
    position: relative;
    z-index: 1;
}

.search-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 50px 40px;
    max-width: 550px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}

.search-container .logo-section {
    margin-bottom: 30px;
}

.search-container .logo-section h1 {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.4;
}

.search-container .logo-section p {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 5px;
}

.search-container .logo-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--border);
}

.search-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
    background: #fafafa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(26, 35, 126, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text-white);
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: var(--text-white);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #c62828, #e53935);
    color: var(--text-white);
}

.btn-warning {
    background: linear-gradient(135deg, #f57f17, #ffa000);
    color: var(--text-white);
}

.btn-secondary {
    background: linear-gradient(135deg, #546e7a, #78909c);
    color: var(--text-white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-danger {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.alert-warning {
    background: #fff8e1;
    color: #f57f17;
    border: 1px solid #ffe082;
}

/* =============================================
   Admin Panel Styles - SIDEBAR LAYOUT
   ============================================= */

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 240px;
    background: linear-gradient(180deg, #1a237e 0%, #0d1642 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
}

.sidebar-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    padding: 15px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left-color: rgba(255,255,255,0.3);
}

.sidebar-link.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-left-color: #ff8f00;
    font-weight: 600;
}

.sidebar-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 10px 0;
}

.logout-link:hover {
    background: rgba(198, 40, 40, 0.3) !important;
    border-left-color: #c62828 !important;
}

/* Main Content Area */
.admin-main {
    flex: 1;
    margin-left: 240px;
    min-height: 100vh;
    background: #f0f2f5;
    transition: margin-left 0.3s ease;
}

.admin-topbar {
    background: #fff;
    padding: 0 25px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    color: var(--text-dark);
}

.sidebar-toggle:hover {
    background: #f0f0f0;
}

.topbar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.admin-content {
    padding: 25px;
}

.admin-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-card .card-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-card .card-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.admin-card .card-body {
    padding: 25px;
}

/* Admin Login */
.admin-login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a237e, #0d47a1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-login-box {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 50px 40px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}

.admin-login-box h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.admin-login-box p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 30px;
}

.admin-login-box .form-group {
    text-align: left;
}

/* Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background: #f8f9ff;
}

.data-table .photo-thumb {
    width: 45px;
    height: 55px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-danger {
    background: #ffebee;
    color: #c62828;
}

.actions {
    display: flex;
    gap: 6px;
}

/* Form in Admin */
.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-group .photo-preview {
    width: 120px;
    height: 150px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    overflow: hidden;
    background: #fafafa;
}

.form-group .photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =============================================
   Responsive - Sidebar
   ============================================= */

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .admin-main {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: block;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .admin-content {
        padding: 15px;
    }
    .data-table {
        font-size: 12px;
    }
    .data-table th, .data-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 600px) {
    .search-container {
        padding: 30px 25px;
    }
}
