@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&family=Playfair+Display:wght@400;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

:root {
    --primary-dark: #050505;
    --primary-light: #0a0a0a;
    --accent-gold: #d4af37;
    --accent-gold-glow: rgba(212, 175, 55, 0.5);
    --text-main: #ffffff;
    --text-muted: #a3a3a3;
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(20, 20, 20, 0.6);
    --sidebar-width: 280px;
    --header-height: 70px;
    --transition-speed: 0.3s;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Background Animation --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 15% 50%, rgba(212, 175, 55, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(212, 175, 55, 0.05), transparent 25%);
    z-index: -1;
    pointer-events: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--accent-gold);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

/* --- Login Page --- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    perspective: 1000px;
}

.login-card {
    background: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform-style: preserve-3d;
    animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0) rotateX(0); }
    50% { transform: translateY(-10px) rotateX(2deg); }
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    font-size: 2.5rem;
    color: var(--accent-gold);
    text-shadow: 0 0 20px var(--accent-gold-glow);
    margin-bottom: 10px;
    display: inline-block;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: var(--transition-speed);
}

.form-control {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all var(--transition-speed);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.form-control:focus + i {
    color: var(--accent-gold);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #b5952f 100%);
    border: none;
    border-radius: 12px;
    color: #000;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.btn-login::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(212, 175, 55, 0.4);
}

.btn-login:hover::after {
    left: 100%;
}

/* --- Admin Layout --- */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 25px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--accent-gold);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.nav-group {
    margin-bottom: 30px;
}

.nav-group-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 15px;
    padding-left: 15px;
    font-weight: 700;
    opacity: 0.7;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text-muted);
    border-radius: 10px;
    margin-bottom: 5px;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
}

.nav-item i {
    width: 24px;
    margin-right: 12px;
    text-align: center;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    padding-left: 20px;
}

.nav-item:hover i {
    color: var(--accent-gold);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.15), transparent);
    color: var(--accent-gold);
    border-left: 3px solid var(--accent-gold);
    border-radius: 0 10px 10px 0;
}

.nav-item.active i {
    color: var(--accent-gold);
}

/* Submenu for detailed sections */
.nav-sub-group {
    margin-left: 20px;
    padding-left: 15px;
    border-left: 1px solid var(--border-color);
    margin-top: 5px;
    margin-bottom: 10px;
}

.nav-sub-item {
    display: block;
    padding: 8px 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.2s;
}

.nav-sub-item:hover {
    color: var(--accent-gold);
    transform: translateX(5px);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top right, #111, #050505);
}

.top-bar {
    height: var(--header-height);
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.page-title {
    font-size: 1.5rem;
    margin: 0;
}

.content-wrapper {
    padding: 40px;
    flex: 1;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    margin: 0;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

th {
    text-align: left;
    padding: 15px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    first-child: border-top-left-radius: 10px;
    last-child: border-top-right-radius: 10px;
}

tr td:first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
tr td:last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }

tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

/* Badges & Buttons */
.badge {
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-info { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--accent-gold);
    color: #000;
}

.btn-primary:hover {
    background: #e0b000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

 / *   - - -   P a g e   H e a d e r   - - -   * / 
 . p a g e - h e a d e r   { 
         d i s p l a y :   f l e x ; 
         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
         a l i g n - i t e m s :   c e n t e r ; 
         m a r g i n - b o t t o m :   3 0 p x ; 
 } 
 
 . p a g e - h e a d e r - t i t l e   h 1   { 
         f o n t - s i z e :   2 r e m ; 
         m a r g i n - b o t t o m :   5 p x ; 
 } 
 
 . p a g e - h e a d e r - t i t l e   p   { 
         c o l o r :   v a r ( - - t e x t - m u t e d ) ; 
 } 
 
 / *   - - -   F o r m   G r i d   - - -   * / 
 . f o r m - g r i d   { 
         d i s p l a y :   g r i d ; 
         g r i d - t e m p l a t e - c o l u m n s :   1 f r   1 f r ; 
         g a p :   2 0 p x ; 
 } 
 
 . f o r m - g r o u p . f u l l - w i d t h   { 
         g r i d - c o l u m n :   s p a n   2 ; 
 } 
 
 / *   - - -   G a l l e r y   G r i d   - - -   * / 
 . g a l l e r y - g r i d   { 
         d i s p l a y :   g r i d ; 
         g r i d - t e m p l a t e - c o l u m n s :   r e p e a t ( a u t o - f i l l ,   m i n m a x ( 2 5 0 p x ,   1 f r ) ) ; 
         g a p :   2 5 p x ; 
 } 
 
 . g a l l e r y - i t e m   { 
         b a c k g r o u n d :   r g b a ( 3 0 ,   3 0 ,   3 0 ,   0 . 4 ) ; 
         b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r - c o l o r ) ; 
         b o r d e r - r a d i u s :   1 2 p x ; 
         p a d d i n g :   1 5 p x ; 
         t r a n s i t i o n :   a l l   0 . 2 s ; 
         p o s i t i o n :   r e l a t i v e ; 
         o v e r f l o w :   h i d d e n ; 
         d i s p l a y :   f l e x ; 
         f l e x - d i r e c t i o n :   c o l u m n ; 
 } 
 
 . g a l l e r y - i t e m : h o v e r   { 
         t r a n s f o r m :   t r a n s l a t e Y ( - 5 p x ) ; 
         b o r d e r - c o l o r :   v a r ( - - a c c e n t - g o l d ) ; 
         b o x - s h a d o w :   0   1 0 p x   2 0 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 3 ) ; 
 } 
 
 . g a l l e r y - i t e m . i n a c t i v e   { 
         o p a c i t y :   0 . 7 ; 
         b o r d e r - s t y l e :   d a s h e d ; 
 } 
 
 . g a l l e r y - i t e m - i m a g e   { 
         d i s p l a y :   b l o c k ; 
         m a r g i n - b o t t o m :   1 5 p x ; 
         p o s i t i o n :   r e l a t i v e ; 
         o v e r f l o w :   h i d d e n ; 
         b o r d e r - r a d i u s :   8 p x ; 
         p a d d i n g - t o p :   7 5 % ;   / *   4 : 3   A s p e c t   R a t i o   * / 
 } 
 
 . g a l l e r y - i t e m - i m a g e   i m g   { 
         p o s i t i o n :   a b s o l u t e ; 
         t o p :   0 ; 
         l e f t :   0 ; 
         w i d t h :   1 0 0 % ; 
         h e i g h t :   1 0 0 % ; 
         o b j e c t - f i t :   c o v e r ; 
         t r a n s i t i o n :   t r a n s f o r m   0 . 5 s ; 
 } 
 
 . g a l l e r y - i t e m : h o v e r   . g a l l e r y - i t e m - i m a g e   i m g   { 
         t r a n s f o r m :   s c a l e ( 1 . 0 5 ) ; 
 } 
 
 . g a l l e r y - i t e m . i n a c t i v e   . g a l l e r y - i t e m - i m a g e   i m g   { 
         f i l t e r :   g r a y s c a l e ( 1 0 0 % ) ; 
 } 
 
 . g a l l e r y - i n f o   { 
         f l e x :   1 ; 
 } 
 
 . g a l l e r y - t i t l e   { 
         c o l o r :   v a r ( - - t e x t - m a i n ) ; 
         f o n t - s i z e :   1 . 1 r e m ; 
         m a r g i n - b o t t o m :   8 p x ; 
         f o n t - f a m i l y :   ' O p e n   S a n s ' ,   s a n s - s e r i f ; 
         f o n t - w e i g h t :   6 0 0 ; 
         w h i t e - s p a c e :   n o w r a p ; 
         o v e r f l o w :   h i d d e n ; 
         t e x t - o v e r f l o w :   e l l i p s i s ; 
 } 
 
 . g a l l e r y - m e t a   { 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         g a p :   8 p x ; 
         m a r g i n - b o t t o m :   1 5 p x ; 
         f l e x - w r a p :   w r a p ; 
 } 
 
 . g a l l e r y - a c t i o n s   { 
         d i s p l a y :   f l e x ; 
         g a p :   1 0 p x ; 
         m a r g i n - t o p :   a u t o ; 
         b o r d e r - t o p :   1 p x   s o l i d   v a r ( - - b o r d e r - c o l o r ) ; 
         p a d d i n g - t o p :   1 5 p x ; 
 } 
 
 . b t n - s m   { 
         p a d d i n g :   6 p x   1 2 p x ; 
         f o n t - s i z e :   0 . 8 r e m ; 
         f l e x :   1 ; 
         j u s t i f y - c o n t e n t :   c e n t e r ; 
 } 
 
 . b t n - d a n g e r   { 
         b a c k g r o u n d :   r g b a ( 2 2 0 ,   5 3 ,   6 9 ,   0 . 1 ) ; 
         c o l o r :   # e f 4 4 4 4 ; 
         b o r d e r :   1 p x   s o l i d   r g b a ( 2 2 0 ,   5 3 ,   6 9 ,   0 . 3 ) ; 
 } 
 
 . b t n - d a n g e r : h o v e r   { 
         b a c k g r o u n d :   r g b a ( 2 2 0 ,   5 3 ,   6 9 ,   0 . 2 ) ; 
         b o x - s h a d o w :   0   0   1 0 p x   r g b a ( 2 3 9 ,   6 8 ,   6 8 ,   0 . 1 ) ; 
 } 
 
 . b t n - s e c o n d a r y   { 
         b a c k g r o u n d :   r g b a ( 1 0 8 ,   1 1 7 ,   1 2 5 ,   0 . 1 ) ; 
         c o l o r :   # c b d 5 e 1 ; 
         b o r d e r :   1 p x   s o l i d   r g b a ( 1 0 8 ,   1 1 7 ,   1 2 5 ,   0 . 3 ) ; 
 } 
 
 . b t n - s e c o n d a r y : h o v e r   { 
         b a c k g r o u n d :   r g b a ( 1 0 8 ,   1 1 7 ,   1 2 5 ,   0 . 2 ) ; 
         c o l o r :   # f f f ; 
         b o x - s h a d o w :   0   0   1 0 p x   r g b a ( 1 0 8 ,   1 1 7 ,   1 2 5 ,   0 . 1 ) ; 
 } 
 
 . t e x t - m u t e d - s m a l l   { 
         f o n t - s i z e :   0 . 7 5 r e m ; 
         c o l o r :   v a r ( - - t e x t - m u t e d ) ; 
 } 
  
 