/**
 * app.css — URD POLIMAS Custom Styles
 * Extends Tailwind CSS with brand colors and components
 */

/* ─── CSS Custom Properties ─────────────────────── */
:root {
    --color-primary:   #0A4D68;
    --color-secondary: #05BFDB;
    --color-accent:    #00FFCA;
    --color-dark:      #1A1A2E;
    --color-light:     #E8F4F8;
    --color-primary-light: rgba(10,77,104,0.1);
    --color-secondary-light: rgba(5,191,219,0.15);
    --shadow-card: 0 4px 24px rgba(10,77,104,0.12);
    --radius-card: 16px;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ─── Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-dark);
    color: var(--color-light);
    min-height: 100vh;
    line-height: 1.6;
}

/* ─── Typography ───────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

a { color: var(--color-secondary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-accent); }

/* ─── Scrollbar ────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,.05); }
::-webkit-scrollbar-thumb { background: var(--color-primary); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-secondary); }

/* ─── Navbar ───────────────────────────────────── */
.navbar-urd {
    background: rgba(26,26,46,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(5,191,219,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--color-secondary) !important;
    letter-spacing: -0.5px;
}

.navbar-brand span { color: var(--color-accent); }

.nav-link {
    color: rgba(232,244,248,0.8) !important;
    font-weight: 500;
    padding: .5rem 1rem !important;
    border-radius: 8px;
    transition: all .2s;
}
.nav-link:hover, .nav-link.active {
    color: var(--color-accent) !important;
    background: rgba(5,191,219,0.1);
}

/* ─── Sidebar ──────────────────────────────────── */
.sidebar {
    width: 260px;
    min-height: 100vh;
    background: rgba(10,77,104,0.15);
    border-right: 1px solid rgba(5,191,219,0.15);
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 900;
    transition: transform .3s ease;
}

.sidebar-logo {
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.05);
    margin-bottom: 1rem;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1.5rem;
    color: rgba(232,244,248,0.7);
    font-weight: 500;
    font-size: .9rem;
    border-radius: 0;
    transition: all .2s;
    cursor: pointer;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.sidebar-nav-item:hover {
    color: var(--color-accent);
    background: rgba(5,191,219,0.08);
    border-left-color: var(--color-secondary);
}

.sidebar-nav-item.active {
    color: var(--color-accent);
    background: rgba(0,255,202,0.08);
    border-left-color: var(--color-accent);
    font-weight: 600;
}

.sidebar-nav-item i { font-size: 1.1rem; width: 20px; text-align: center; }

.sidebar-section-title {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(232,244,248,0.35);
    padding: .75rem 1.5rem .35rem;
    margin-top: .5rem;
}

/* Main content offset */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: margin .3s ease;
    padding: 1.5rem;
}

@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
}

/* ─── Cards ────────────────────────────────────── */
.card-urd {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(5,191,219,.12);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    transition: border-color .2s, transform .2s;
}
.card-urd:hover {
    border-color: rgba(5,191,219,.3);
    transform: translateY(-2px);
}

.card-header-urd {
    background: rgba(10,77,104,0.3);
    border-bottom: 1px solid rgba(5,191,219,.12);
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    padding: 1rem 1.5rem;
}

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

/* Stats cards */
.stat-card {
    background: linear-gradient(135deg, rgba(10,77,104,0.4), rgba(5,191,219,0.15));
    border: 1px solid rgba(5,191,219,.2);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(0,255,202,0.08);
}
.stat-card .stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
}
.stat-card .stat-label {
    font-size: .85rem;
    color: rgba(232,244,248,.6);
    margin-top: .25rem;
}
.stat-card .stat-icon {
    font-size: 2rem;
    color: var(--color-secondary);
    opacity: .7;
}

/* ─── Buttons ──────────────────────────────────── */
.btn-primary-urd {
    background: var(--color-primary);
    color: var(--color-accent);
    border: none;
    padding: .6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}
.btn-primary-urd:hover {
    background: var(--color-secondary);
    color: var(--color-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5,191,219,0.3);
}

.btn-secondary-urd {
    background: transparent;
    color: var(--color-secondary);
    border: 1px solid var(--color-secondary);
    padding: .6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}
.btn-secondary-urd:hover {
    background: var(--color-secondary);
    color: var(--color-dark);
    transform: translateY(-1px);
}

.btn-accent-urd {
    background: var(--color-accent);
    color: var(--color-dark);
    border: none;
    padding: .6rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}
.btn-accent-urd:hover {
    background: #00e6b5;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,255,202,0.4);
}

.btn-danger-urd {
    background: rgba(220,53,69,0.15);
    color: #f87171;
    border: 1px solid rgba(220,53,69,0.3);
    padding: .5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}
.btn-danger-urd:hover {
    background: rgba(220,53,69,0.3);
    color: #fff;
}

/* ─── Forms ────────────────────────────────────── */
.form-control-urd {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(5,191,219,.2);
    border-radius: 8px;
    color: var(--color-light);
    padding: .65rem 1rem;
    width: 100%;
    font-size: .9rem;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.form-control-urd::placeholder { color: rgba(232,244,248,.3); }
.form-control-urd:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(5,191,219,.15);
    background: rgba(255,255,255,.08);
}
.form-control-urd option { background: var(--color-dark); }

.form-label-urd {
    font-size: .85rem;
    font-weight: 600;
    color: rgba(232,244,248,.8);
    margin-bottom: .4rem;
    display: block;
}

.form-group-urd { margin-bottom: 1.25rem; }

.input-group-urd {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.input-group-urd .input-icon {
    position: absolute;
    left: .875rem;
    color: rgba(232,244,248,.4);
    pointer-events: none;
}
.input-group-urd .form-control-urd { padding-left: 2.5rem; }
.input-group-urd { position: relative; }

/* ─── Tables ───────────────────────────────────── */
.table-urd {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
.table-urd thead th {
    background: rgba(10,77,104,0.4);
    color: var(--color-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: .75rem;
    letter-spacing: .5px;
    padding: .875rem 1rem;
    border-bottom: 1px solid rgba(5,191,219,.2);
    white-space: nowrap;
}
.table-urd tbody tr {
    border-bottom: 1px solid rgba(255,255,255,.04);
    transition: background .15s;
}
.table-urd tbody tr:hover { background: rgba(5,191,219,.05); }
.table-urd tbody td {
    padding: .875rem 1rem;
    color: rgba(232,244,248,.85);
    vertical-align: middle;
}

/* ─── Badges ───────────────────────────────────── */
.badge-urd {
    display: inline-flex;
    align-items: center;
    padding: .25rem .75rem;
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .3px;
}
.badge-success { background: rgba(16,185,129,.15); color: #6ee7b7; border: 1px solid rgba(16,185,129,.2); }
.badge-warning { background: rgba(245,158,11,.15); color: #fcd34d; border: 1px solid rgba(245,158,11,.2); }
.badge-danger  { background: rgba(239,68,68,.15);  color: #fca5a5; border: 1px solid rgba(239,68,68,.2); }
.badge-info    { background: rgba(5,191,219,.15);  color: var(--color-secondary); border: 1px solid rgba(5,191,219,.2); }
.badge-primary { background: rgba(10,77,104,.4);   color: var(--color-accent); border: 1px solid rgba(5,191,219,.15); }
.badge-secondary { background: rgba(255,255,255,.08); color: rgba(232,244,248,.7); border: 1px solid rgba(255,255,255,.1); }

/* ─── Alerts ───────────────────────────────────── */
.alert-urd {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    font-size: .9rem;
}
.alert-success { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.2); color: #6ee7b7; }
.alert-warning { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.2); color: #fcd34d; }
.alert-danger  { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.2);  color: #fca5a5; }
.alert-info    { background: rgba(5,191,219,.1);  border: 1px solid rgba(5,191,219,.2);  color: var(--color-secondary); }

/* ─── Avatar ───────────────────────────────────── */
.avatar {
    border-radius: 50%;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: .75rem; }
.avatar-md { width: 48px; height: 48px; font-size: 1rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.5rem; }
.avatar-xl { width: 96px; height: 96px; font-size: 2rem; }

/* ─── Hero Section ─────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, var(--color-dark) 0%, rgba(10,77,104,0.6) 50%, var(--color-dark) 100%);
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(5,191,219,0.08) 0%, transparent 60%),
                radial-gradient(circle at 70% 80%, rgba(0,255,202,0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* ─── Section Titles ───────────────────────────── */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px; left: 0;
    width: 60px; height: 3px;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-accent));
    border-radius: 99px;
}

/* ─── Activity Cards ───────────────────────────── */
.activity-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(5,191,219,.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all .25s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.activity-card:hover {
    border-color: rgba(5,191,219,.3);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(10,77,104,0.25);
}
.activity-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.activity-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.activity-card-category {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-secondary);
    margin-bottom: .5rem;
}
.activity-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: .5rem;
    line-height: 1.4;
}
.activity-card-meta {
    font-size: .8rem;
    color: rgba(232,244,248,.5);
    display: flex;
    align-items: center;
    gap: .35rem;
}

/* ─── Pagination ───────────────────────────────── */
.page-link {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(5,191,219,.15);
    color: var(--color-light) !important;
    border-radius: 6px !important;
    margin: 0 2px;
    transition: all .2s;
}
.page-link:hover {
    background: rgba(5,191,219,.15);
    border-color: var(--color-secondary);
    color: var(--color-secondary) !important;
}
.page-item.active .page-link {
    background: var(--color-primary) !important;
    border-color: var(--color-secondary) !important;
    color: var(--color-accent) !important;
}
.page-item.disabled .page-link {
    opacity: .4;
    cursor: not-allowed;
}

/* ─── Modals ───────────────────────────────────── */
.modal-urd .modal-content {
    background: #1e2a3a;
    border: 1px solid rgba(5,191,219,.2);
    border-radius: var(--radius-card);
    color: var(--color-light);
}
.modal-urd .modal-header {
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 1.25rem 1.5rem;
}
.modal-urd .modal-title { color: #fff; font-weight: 700; }
.modal-urd .modal-footer { border-top: 1px solid rgba(255,255,255,.08); }
.modal-urd .btn-close { filter: invert(1); }

/* ─── Loading Spinner ──────────────────────────── */
.spinner-urd {
    width: 40px; height: 40px;
    border: 3px solid rgba(5,191,219,.2);
    border-top-color: var(--color-secondary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Notification Bell ────────────────────────── */
.notif-bell { position: relative; }
.notif-badge {
    position: absolute;
    top: -4px; right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    width: 16px; height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── Toast Notifications ──────────────────────── */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-width: 360px;
}
.toast-urd {
    background: #1e2a3a;
    border: 1px solid rgba(5,191,219,.2);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
    animation: slideIn .3s ease;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
}

/* ─── Search Box ───────────────────────────────── */
.search-box {
    position: relative;
    flex: 1;
}
.search-box input {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(5,191,219,.2);
    border-radius: 10px;
    color: var(--color-light);
    padding: .6rem 1rem .6rem 2.75rem;
    width: 100%;
    outline: none;
    font-size: .9rem;
    transition: all .2s;
}
.search-box input::placeholder { color: rgba(232,244,248,.3); }
.search-box input:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(5,191,219,.12);
}
.search-box .search-icon {
    position: absolute;
    left: .875rem; top: 50%;
    transform: translateY(-50%);
    color: rgba(232,244,248,.4);
    pointer-events: none;
}

/* ─── Empty State ──────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}
.empty-state-icon {
    font-size: 4rem;
    color: rgba(5,191,219,.3);
    margin-bottom: 1rem;
}
.empty-state-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: rgba(232,244,248,.7);
    margin-bottom: .5rem;
}
.empty-state-text {
    font-size: .9rem;
    color: rgba(232,244,248,.4);
}

/* ─── Page Header ──────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.page-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}
.page-breadcrumb {
    font-size: .8rem;
    color: rgba(232,244,248,.5);
    margin-top: .25rem;
}
.page-breadcrumb a { color: var(--color-secondary); }
.page-breadcrumb span { margin: 0 .4rem; }

/* ─── Profile ──────────────────────────────────── */
.profile-card {
    background: linear-gradient(135deg, rgba(10,77,104,0.4), rgba(5,191,219,0.1));
    border: 1px solid rgba(5,191,219,.2);
    border-radius: var(--radius-card);
    padding: 2rem;
    text-align: center;
}

/* ─── Calendar ─────────────────────────────────── */
.fc {
    color: var(--color-light) !important;
    font-family: var(--font-sans) !important;
}
.fc .fc-toolbar-title { color: #fff !important; font-size: 1.1rem !important; }
.fc .fc-button-primary {
    background: var(--color-primary) !important;
    border-color: var(--color-secondary) !important;
    color: var(--color-accent) !important;
}
.fc .fc-button-primary:hover {
    background: var(--color-secondary) !important;
    color: var(--color-dark) !important;
}
.fc .fc-daygrid-day { background: rgba(255,255,255,.02) !important; }
.fc .fc-daygrid-day:hover { background: rgba(5,191,219,.05) !important; }
.fc .fc-col-header-cell { background: rgba(10,77,104,.3) !important; color: var(--color-secondary) !important; }
.fc .fc-daygrid-day-number { color: rgba(232,244,248,.7) !important; }
.fc .fc-day-today { background: rgba(0,255,202,.06) !important; }
.fc .fc-event {
    background: var(--color-primary) !important;
    border-color: var(--color-secondary) !important;
    color: var(--color-accent) !important;
    border-radius: 4px !important;
    font-size: .75rem !important;
    font-weight: 600 !important;
}

/* ─── Utility Classes ──────────────────────────── */
.text-accent    { color: var(--color-accent) !important; }
.text-secondary-urd { color: var(--color-secondary) !important; }
.text-muted-urd { color: rgba(232,244,248,.5) !important; }
.bg-primary-urd { background: var(--color-primary) !important; }
.bg-dark-urd    { background: var(--color-dark) !important; }
.border-urd     { border-color: rgba(5,191,219,.2) !important; }
.rounded-urd    { border-radius: var(--radius-card) !important; }

.divider-urd {
    border: none;
    border-top: 1px solid rgba(255,255,255,.08);
    margin: 1.5rem 0;
}

/* ─── Responsive ───────────────────────────────── */
@media (max-width: 768px) {
    .page-header h1 { font-size: 1.4rem; }
    .section-title  { font-size: 1.5rem; }
    .hero-section   { padding: 4rem 0 3rem; }
    .main-content   { padding: 1rem; }
    .stat-card .stat-value { font-size: 1.75rem; }
}

/* ─── Print ────────────────────────────────────── */
@media print {
    .sidebar, .navbar-urd, .btn-primary-urd, .btn-secondary-urd { display: none !important; }
    .main-content { margin-left: 0 !important; }
    body { background: #fff !important; color: #000 !important; }
}
