/* Google Fonts: Sarabun */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;700&display=swap');

:root {
    --primary: #04172b;
    --primary-light: #0a2e52;
    --secondary: #d4af37; /* Gold */
    --secondary-light: #f3cf55;
    --white: #ffffff;
    --light-bg: #f9f9f9;
    --text-color: #333;
    --text-light: #f4f4f4;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sarabun', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--secondary);
    border: 1px solid var(--primary);
}

.btn-primary:hover {
    background-color: var(--secondary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-secondary:hover {
    background-color: var(--secondary);
    color: var(--primary);
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.glass-dark {
    background: rgba(4, 23, 43, 0.85); /* Primary color with opacity */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
}

/* Header */
header {
    background-color: var(--primary);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links li a {
    color: var(--white);
    font-weight: 500;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--secondary);
}

/* Hero Section */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(4, 23, 43, 0.7), rgba(4, 23, 43, 0.7)), url('../images/hero-bg.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Admin Styles */
body.admin-body {
    background-color: #f0f2f5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: var(--primary);
}

.login-card {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 15px 25px rgba(0,0,0,0.2);
    text-align: center;
}

.login-card h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
}

/* Admin Dashboard Layout */
.admin-container {
    display: flex;
    flex: 1;
}

.admin-sidebar {
    width: 250px;
    background-color: var(--primary);
    color: var(--white);
    padding: 20px 0;
    min-height: 100vh;
}

.admin-sidebar ul li a {
    display: block;
    padding: 15px 20px;
    color: rgba(255,255,255,0.7);
    border-left: 4px solid transparent;
}

.admin-sidebar ul li a:hover,
.admin-sidebar ul li a.active {
    background-color: rgba(255,255,255,0.05);
    color: var(--white);
    border-left-color: var(--secondary);
}

.admin-content {
    flex: 1;
    padding: 30px;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-icon {
    font-size: 2rem;
    color: var(--secondary);
}

.card-info h3 {
    font-size: 2rem;
    color: var(--primary);
}

.card-info p {
    color: #888;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        min-height: auto;
    }
}

.admin-content header {
    padding: 20px 40px !important;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    background-color: var(--primary);
}

/* Premium Admin Table */
.table-wrapper {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-top: 20px;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th, .table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #f0f0f5;
    vertical-align: middle;
}

.table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.table tbody tr {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8fafc;
    transform: scale(1.002);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Modern Admin Buttons */
.btn-sm {
    padding: 8px 14px;
    font-size: 0.85rem;
    margin-right: 6px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transform: translateY(-1px);
}

.btn-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fca5a5;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
    transform: translateY(-1px);
}

.btn-primary {
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(4, 23, 43, 0.15);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
