/* ============================================
   SunuJur - Stunning UI Stylesheet
   ============================================ */

/* ---- CSS Variables ---- */
:root {
    --primary: #1B6B3A;
    --primary-light: #2D8F4E;
    --primary-dark: #145029;
    --primary-50: rgba(27, 107, 58, 0.05);
    --primary-100: rgba(27, 107, 58, 0.1);
    --primary-200: rgba(27, 107, 58, 0.2);

    --secondary: #D4A017;
    --secondary-light: #E8B832;
    --secondary-dark: #B58914;

    --accent: #C1272D;
    --accent-light: #E63946;

    --dark: #1a1a2e;
    --dark-light: #2d2d44;
    --gray-50: #f8f9fa;
    --gray-100: #f0f2f5;
    --gray-200: #e2e6ea;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;

    --success: #059669;
    --warning: #D97706;
    --danger: #DC2626;
    --info: #2563EB;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Global Reset & Base ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
    font-family: var(--font-main);
    color: var(--gray-700);
    background: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; }

/* ---- Utility Classes ---- */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-accent { color: var(--accent) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-primary-light { background-color: var(--primary-light) !important; }
.gradient-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.gradient-hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 50%, var(--primary) 100%);
}

/* ============================================
   LANDING PAGE
   ============================================ */

/* ---- Navbar ---- */
.navbar-landing {
    background: transparent;
    padding: 1.2rem 0;
    transition: var(--transition);
    z-index: 1000;
}

.navbar-landing.scrolled {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    padding: 0.8rem 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.2);
}

.navbar-brand-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff !important;
    letter-spacing: -0.5px;
}

.navbar-brand-custom .brand-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    box-shadow: 0 4px 15px rgba(212, 160, 23, 0.3);
}

.nav-link-landing {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    padding: 0.5rem 1.2rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-link-landing:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.1);
}

.btn-nav-login {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: var(--radius-xl);
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.btn-nav-login:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(212, 160, 23, 0.4);
}

/* ---- Hero Section ---- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #0a1628 0%, #0d2b1a 40%, #145029 70%, #1B6B3A 100%);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(135deg, rgba(10, 22, 40, 0.92) 0%, rgba(13, 43, 26, 0.88) 40%, rgba(20, 80, 41, 0.85) 70%, rgba(27, 107, 58, 0.82) 100%),
        url('https://images.unsplash.com/photo-1500595046743-cd271d694d30?w=1920&q=80') center/cover no-repeat;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, var(--gray-50), transparent);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(212, 160, 23, 0.15);
    border: 1px solid rgba(212, 160, 23, 0.3);
    border-radius: var(--radius-xl);
    color: var(--secondary-light);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.7);
    max-width: 550px;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-hero-primary {
    padding: 16px 36px;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    color: #fff;
    border: none;
    border-radius: var(--radius-xl);
    font-size: 1.05rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 8px 30px rgba(212, 160, 23, 0.3);
    cursor: pointer;
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(212, 160, 23, 0.45);
    color: #fff;
}

.btn-hero-secondary {
    padding: 16px 36px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius-xl);
    font-size: 1.05rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.btn-hero-secondary:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
    color: #fff;
    transform: translateY(-3px);
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary-light);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-visual {
    position: relative;
    z-index: 2;
}

.hero-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-lg);
    padding: 2rem;
    color: #fff;
    box-shadow: var(--shadow-xl);
}

.hero-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.hero-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.hero-card-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.hero-card-subtitle {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

.animal-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,0.06);
}

.animal-preview-avatar {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.animal-preview-info h6 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.animal-preview-info small {
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
}

.animal-preview-status {
    margin-left: auto;
    padding: 4px 12px;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background: rgba(5, 150, 105, 0.2);
    color: #34D399;
}

.status-alert {
    background: rgba(220, 38, 38, 0.2);
    color: #F87171;
}

/* ---- Features Section ---- */
.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--primary-100);
    color: var(--primary);
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray-500);
    line-height: 1.7;
}

.feature-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-200);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.feature-icon.green { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.feature-icon.gold { background: linear-gradient(135deg, var(--secondary), var(--secondary-light)); }
.feature-icon.red { background: linear-gradient(135deg, var(--accent), var(--accent-light)); }
.feature-icon.blue { background: linear-gradient(135deg, var(--info), #3B82F6); }
.feature-icon.purple { background: linear-gradient(135deg, #7C3AED, #8B5CF6); }
.feature-icon.teal { background: linear-gradient(135deg, #0D9488, #14B8A6); }

.feature-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ---- Actors Section ---- */
.actor-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    height: 100%;
}

.actor-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.actor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
}

.actor-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.actor-card p {
    color: var(--gray-500);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ---- CTA Section ---- */
.cta-section {
    background:
        linear-gradient(135deg, rgba(26, 26, 46, 0.93) 0%, rgba(20, 80, 41, 0.9) 100%),
        url('https://images.unsplash.com/photo-1516467508483-a7212febe31a?w=1920&q=80') center/cover no-repeat;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.1), transparent);
    border-radius: 50%;
}

/* ---- Footer ---- */
.footer-landing {
    background: var(--dark);
    padding: 3rem 0 1.5rem;
    color: rgba(255,255,255,0.6);
}

.footer-landing a {
    color: rgba(255,255,255,0.6);
}

.footer-landing a:hover {
    color: var(--secondary-light);
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    background: var(--gray-50);
}

.login-left {
    flex: 1;
    background:
        linear-gradient(135deg, rgba(10, 22, 40, 0.88), rgba(20, 80, 41, 0.85), rgba(27, 107, 58, 0.82)),
        url('https://images.unsplash.com/photo-1596733430284-f7437764b1a9?w=1200&q=80') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800"><circle cx="400" cy="400" r="350" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/><circle cx="400" cy="400" r="250" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/><circle cx="400" cy="400" r="150" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.login-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.login-card {
    width: 100%;
    max-width: 440px;
}

.login-card h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.login-card .subtitle {
    color: var(--gray-500);
    margin-bottom: 2rem;
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */

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

/* ---- Sidebar ---- */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--dark), #0d1b2a);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-brand {
    padding: 1.5rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-brand h5 {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

.sidebar-brand small {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.sidebar-section {
    padding: 0 1rem;
    margin-bottom: 0.5rem;
}

.sidebar-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.3);
    padding: 0.75rem 0.75rem 0.5rem;
    font-weight: 600;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.65rem 0.75rem;
    color: rgba(255,255,255,0.6);
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

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

.sidebar-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 4px 15px rgba(27, 107, 58, 0.3);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-link .badge {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 3px 8px;
}

.sidebar-user {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    text-transform: capitalize;
}

/* ---- Main Content ---- */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- Top Bar ---- */
.topbar {
    background: #fff;
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

.topbar-toggle:hover {
    background: var(--gray-100);
}

.breadcrumb-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-custom li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--gray-400);
}

.breadcrumb-custom li a {
    color: var(--gray-500);
}

.breadcrumb-custom li a:hover {
    color: var(--primary);
}

.breadcrumb-custom li.active {
    color: var(--gray-700);
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.topbar-btn:hover {
    background: var(--gray-200);
    color: var(--primary);
}

.topbar-btn .notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid #fff;
}

/* ---- Page Content ---- */
.page-content {
    padding: 2rem;
    flex: 1;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.page-title small {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ---- Stat Cards ---- */
.stat-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 0 0 0 100%;
    opacity: 0.1;
}

.stat-card.green::after { background: var(--primary); }
.stat-card.gold::after { background: var(--secondary); }
.stat-card.red::after { background: var(--accent); }
.stat-card.blue::after { background: var(--info); }

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
}

.stat-card-icon.green { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.stat-card-icon.gold { background: linear-gradient(135deg, var(--secondary), var(--secondary-light)); }
.stat-card-icon.red { background: linear-gradient(135deg, var(--accent), var(--accent-light)); }
.stat-card-icon.blue { background: linear-gradient(135deg, var(--info), #3B82F6); }
.stat-card-icon.purple { background: linear-gradient(135deg, #7C3AED, #8B5CF6); }
.stat-card-icon.teal { background: linear-gradient(135deg, #0D9488, #14B8A6); }

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
}

.stat-card-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.stat-card-trend {
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-xl);
}

.stat-card-trend.up {
    color: var(--success);
    background: rgba(5, 150, 105, 0.1);
}

.stat-card-trend.down {
    color: var(--danger);
    background: rgba(220, 38, 38, 0.1);
}

/* ---- Cards ---- */
.card-custom {
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-custom .card-header {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-custom .card-header h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

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

/* ---- Tables ---- */
.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom thead th {
    background: var(--gray-50);
    padding: 0.85rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.table-custom tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9rem;
    vertical-align: middle;
}

.table-custom tbody tr {
    transition: var(--transition);
}

.table-custom tbody tr:hover {
    background: var(--primary-50);
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

/* ---- Buttons ---- */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(27, 107, 58, 0.3);
    color: #fff;
}

.btn-secondary-custom {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-secondary-custom:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.btn-danger-custom {
    background: linear-gradient(135deg, var(--danger), #EF4444);
    color: #fff;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-danger-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    color: #fff;
}

.btn-warning-custom {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    color: #fff;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-sm-custom {
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

/* ---- Form Styles ---- */
.form-label-custom {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.4rem;
}

.form-control-custom {
    padding: 0.65rem 1rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: var(--transition);
    background: #fff;
    width: 100%;
}

.form-control-custom:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-100);
    outline: none;
}

.form-select-custom {
    padding: 0.65rem 1rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: var(--transition);
    background: #fff;
    width: 100%;
    appearance: auto;
}

.form-select-custom:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-100);
    outline: none;
}

/* ---- Status Badges ---- */
.badge-status {
    padding: 4px 12px;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge-active { background: rgba(5,150,105,0.1); color: var(--success); }
.badge-active::before { background: var(--success); }

.badge-sold { background: rgba(37,99,235,0.1); color: var(--info); }
.badge-sold::before { background: var(--info); }

.badge-stolen { background: rgba(220,38,38,0.1); color: var(--danger); }
.badge-stolen::before { background: var(--danger); }

.badge-dead { background: rgba(107,114,128,0.1); color: var(--gray-500); }
.badge-dead::before { background: var(--gray-500); }

.badge-lost { background: rgba(217,119,6,0.1); color: var(--warning); }
.badge-lost::before { background: var(--warning); }

.badge-recovered { background: rgba(5,150,105,0.1); color: var(--success); }
.badge-recovered::before { background: var(--success); }

.badge-slaughtered { background: rgba(124,58,237,0.1); color: #7C3AED; }
.badge-slaughtered::before { background: #7C3AED; }

/* ---- Alert Flash Messages ---- */
.flash-message {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.flash-success {
    background: rgba(5,150,105,0.1);
    color: var(--success);
    border: 1px solid rgba(5,150,105,0.2);
}

.flash-error {
    background: rgba(220,38,38,0.1);
    color: var(--danger);
    border: 1px solid rgba(220,38,38,0.2);
}

.flash-warning {
    background: rgba(217,119,6,0.1);
    color: var(--warning);
    border: 1px solid rgba(217,119,6,0.2);
}

.flash-info {
    background: rgba(37,99,235,0.1);
    color: var(--info);
    border: 1px solid rgba(37,99,235,0.2);
}

@keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ---- Pagination ---- */
.pagination-custom {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 1rem 0;
}

.pagination-custom .page-link {
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    background: #fff;
    display: block;
}

.pagination-custom .page-link:hover {
    background: var(--primary-100);
    color: var(--primary);
    border-color: var(--primary-200);
}

.pagination-custom .active .page-link {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ---- Photo Gallery ---- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--gray-200);
    transition: var(--transition);
}

.photo-item:hover {
    border-color: var(--primary);
    transform: scale(1.02);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-item .photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-primary-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    background: var(--secondary);
    color: #fff;
    border-radius: var(--radius-xl);
    font-size: 0.7rem;
    font-weight: 600;
}

/* ---- RFID Scanner UI ---- */
.rfid-scanner {
    background: linear-gradient(135deg, var(--dark), var(--primary-dark));
    border-radius: var(--radius-lg);
    padding: 2rem;
    color: #fff;
    text-align: center;
}

.rfid-scanner-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 160, 23, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(212, 160, 23, 0); }
}

.rfid-input {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    color: #fff;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 1rem;
    border-radius: var(--radius-sm);
    width: 100%;
    max-width: 400px;
    margin: 1rem auto;
}

.rfid-input::placeholder {
    color: rgba(255,255,255,0.3);
    font-weight: 400;
    letter-spacing: 0;
    font-size: 0.95rem;
}

.rfid-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.2);
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gray-400);
}

.empty-state h5 {
    color: var(--gray-700);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-500);
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

/* ---- Offline Indicator ---- */
.offline-bar {
    background: var(--warning);
    color: #fff;
    text-align: center;
    padding: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    display: none;
}

.offline-bar.show {
    display: block;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* ============================================
   TABLET (max-width: 991px)
   ============================================ */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .topbar-toggle {
        display: block;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 99;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .hero-stats {
        gap: 20px;
    }

    .login-left {
        display: none;
    }

    /* Tables: horizontal scroll wrapper */
    .table-responsive-mobile {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1px;
    }

    .table-custom {
        min-width: 600px;
    }
}

/* ============================================
   MOBILE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    .page-content {
        padding: 0.85rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 15px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Stat cards: 2 per row */
    .stat-card {
        padding: 1rem;
    }

    .stat-card-value {
        font-size: 1.5rem;
    }

    .stat-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Cards */
    .card-custom .card-header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .card-custom .card-body {
        padding: 1rem;
    }

    /* RFID Scanner: full width, larger input for thumb */
    .rfid-scanner {
        padding: 1.5rem 1rem;
        border-radius: var(--radius-md);
    }

    .rfid-scanner .row {
        text-align: center;
    }

    .rfid-scanner-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .rfid-input {
        font-size: 1.1rem !important;
        padding: 0.85rem 1rem !important;
        text-align: center !important;
        letter-spacing: 1px;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Buttons: larger touch targets (min 44px) */
    .btn-primary-custom,
    .btn-secondary-custom,
    .btn-danger-custom,
    .btn-warning-custom {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .btn-sm-custom {
        padding: 0.5rem 0.85rem;
        min-height: 38px;
    }

    .btn-icon {
        width: 44px;
        height: 44px;
    }

    /* Forms: larger inputs for touch */
    .form-control-custom,
    .form-select-custom {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        min-height: 44px;
    }

    .form-label-custom {
        font-size: 0.9rem;
    }

    /* Page title */
    .page-title {
        font-size: 1.35rem;
    }

    /* Section headers */
    .section-title {
        font-size: 1.75rem;
    }

    .section {
        padding: 3.5rem 0;
    }

    /* Topbar */
    .topbar {
        padding: 0.6rem 1rem;
    }

    .breadcrumb-custom {
        font-size: 0.8rem;
    }

    .topbar-btn {
        width: 44px;
        height: 44px;
    }

    /* Hero section mobile */
    .hero-section {
        min-height: auto;
        padding: 6rem 0 3rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }

    .hero-card {
        padding: 1.25rem;
    }

    .hero-stat-value {
        font-size: 1.5rem;
    }

    .hero-stat-label {
        font-size: 0.7rem;
    }

    /* Feature cards */
    .feature-card {
        padding: 1.5rem;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    /* Actor cards */
    .actor-avatar {
        width: 65px;
        height: 65px;
        font-size: 1.6rem;
    }

    /* Sidebar mobile: full width when open */
    .sidebar {
        width: 85%;
        max-width: 320px;
    }

    .sidebar-link {
        padding: 0.8rem 0.75rem;
        font-size: 1rem;
        min-height: 44px;
    }

    .sidebar-link i {
        font-size: 1.1rem;
        width: 24px;
    }

    .sidebar-section-title {
        font-size: 0.75rem;
    }

    .sidebar-user {
        padding: 1rem;
    }

    /* Photo grid */
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    /* Photo overlay always visible on mobile (no hover) */
    .photo-item .photo-overlay {
        opacity: 1;
        background: rgba(0,0,0,0.3);
    }

    /* Pagination: larger touch targets */
    .pagination-custom .page-link {
        padding: 0.6rem 0.9rem;
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Flash messages */
    .flash-message {
        padding: 0.85rem 1rem;
        font-size: 0.85rem;
    }

    /* Tables: card layout on very small screens */
    .table-custom thead th {
        padding: 0.65rem 0.5rem;
        font-size: 0.7rem;
    }

    .table-custom tbody td {
        padding: 0.65rem 0.5rem;
        font-size: 0.8rem;
    }

    /* Badge statuses */
    .badge-status {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    /* CTA section */
    .cta-section {
        padding: 3rem 0;
    }

    .cta-section h2 {
        font-size: 1.75rem !important;
    }

    /* Login page */
    .login-right {
        padding: 1.5rem;
    }

    .login-card h2 {
        font-size: 1.6rem;
    }

    /* Empty state */
    .empty-state {
        padding: 2.5rem 1rem;
    }

    .empty-state-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    /* Offline bar */
    .offline-bar {
        font-size: 0.8rem;
        padding: 10px;
    }
}

/* ============================================
   SMALL MOBILE (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    .page-content {
        padding: 0.65rem;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .page-title small {
        font-size: 0.75rem;
    }

    /* Stack stat cards: 1 per row on very small screens */
    .stat-card-value {
        font-size: 1.3rem;
    }

    /* Hero */
    .hero-title {
        font-size: 1.6rem;
        letter-spacing: -0.5px;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 6px 14px;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-stats {
        gap: 10px;
    }

    .hero-stat {
        flex: 1;
        min-width: 60px;
    }

    .hero-stat-value {
        font-size: 1.2rem;
    }

    /* Section titles */
    .section-title {
        font-size: 1.4rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    /* Navbar brand */
    .navbar-brand-custom {
        font-size: 1.3rem;
    }

    .navbar-brand-custom .brand-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    /* Tables: minimal padding */
    .table-custom thead th {
        padding: 0.5rem 0.35rem;
        font-size: 0.65rem;
        letter-spacing: 0;
    }

    .table-custom tbody td {
        padding: 0.5rem 0.35rem;
        font-size: 0.75rem;
    }

    /* Hide less important table columns on small screens */
    .hide-mobile {
        display: none !important;
    }

    /* Sidebar: even wider on very small */
    .sidebar {
        width: 90%;
    }

    /* Footer */
    .footer-landing {
        text-align: center;
    }

    .footer-landing .row > div {
        text-align: center !important;
    }

    /* RFID scanner */
    .rfid-input {
        font-size: 1rem !important;
    }

    /* Animal preview in hero */
    .animal-preview {
        padding: 8px;
        gap: 10px;
    }

    .animal-preview-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .animal-preview-info h6 {
        font-size: 0.8rem;
    }

    .animal-preview-info small {
        font-size: 0.7rem;
    }

    .animal-preview-status {
        font-size: 0.65rem;
        padding: 3px 8px;
    }

    /* Certificate cards in reports */
    .cert-card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects that don't work on touch */
    .feature-card:hover,
    .actor-card:hover,
    .stat-card:hover {
        transform: none;
    }

    /* Make photo overlay always visible */
    .photo-item .photo-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    }

    /* Increase all interactive element sizes */
    .sidebar-link {
        min-height: 48px;
        padding: 0.85rem 0.75rem;
    }

    /* Ensure all links/buttons meet 44px minimum */
    a, button {
        min-height: 44px;
    }

    /* Disable text selection on buttons for better touch feel */
    .btn-primary-custom,
    .btn-secondary-custom,
    .btn-danger-custom,
    .btn-warning-custom,
    .btn-icon,
    .sidebar-link,
    .nav-link-landing {
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
}

/* ============================================
   MOBILE TABLE CARD VIEW
   ============================================ */
@media (max-width: 640px) {
    .table-card-mobile thead {
        display: none;
    }

    .table-card-mobile tbody tr {
        display: block;
        margin-bottom: 0.75rem;
        padding: 1rem;
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-sm);
        background: #fff;
    }

    .table-card-mobile tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.4rem 0;
        border-bottom: 1px solid var(--gray-100);
        font-size: 0.85rem;
    }

    .table-card-mobile tbody td:last-child {
        border-bottom: none;
        padding-top: 0.75rem;
        justify-content: flex-end;
        gap: 8px;
    }

    .table-card-mobile tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gray-500);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        flex-shrink: 0;
        margin-right: 1rem;
    }
}

/* ============================================
   MOBILE BOTTOM NAV (quick actions)
   ============================================ */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--gray-200);
    padding: 0.5rem 0;
    z-index: 90;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.mobile-bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-bottom-nav-items a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--gray-400);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.3rem 0.5rem;
    min-width: 56px;
    min-height: 44px;
    justify-content: center;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mobile-bottom-nav-items a i {
    font-size: 1.15rem;
}

.mobile-bottom-nav-items a.active {
    color: var(--primary);
}

.mobile-bottom-nav-items a:hover {
    color: var(--primary);
    background: var(--primary-50);
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: block;
    }

    /* Add bottom padding to main content to prevent overlap */
    .page-content {
        padding-bottom: 5rem;
    }
}

/* ============================================
   LANDSCAPE MOBILE
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 4rem 0 2rem;
    }

    .login-page {
        min-height: auto;
    }
}

/* ---- Print Styles ---- */
@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .page-content { padding: 0 !important; }
}

/* ============================================
   MULTI-TENANT COMPONENTS
   ============================================ */

/* ---- Org Switcher ---- */
.org-switcher .dropdown-toggle::after {
    margin-left: auto;
}
.org-switcher .dropdown-menu {
    background: var(--dark);
    border: 1px solid rgba(255,255,255,0.12);
}
.org-switcher .dropdown-item {
    color: rgba(255,255,255,0.8);
    padding: 0.6rem 1rem;
}
.org-switcher .dropdown-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

/* ---- Wallet Card ---- */
.wallet-card {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(212, 160, 23, 0.3);
}

.wallet-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent);
    border-radius: 50%;
    pointer-events: none;
}

.wallet-balance {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
}

.wallet-balance.low { color: #FED7AA; }
.wallet-balance.critical { color: #FECACA; }

.wallet-balance-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

/* ---- Org Status Badges ---- */
.badge-org-status {
    padding: 4px 12px;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-org-active { background: rgba(5,150,105,0.1); color: var(--success); }
.badge-org-suspended { background: rgba(220,38,38,0.1); color: var(--danger); }
.badge-org-pending { background: rgba(217,119,6,0.1); color: var(--warning); }
.badge-org-rejected { background: rgba(107,114,128,0.1); color: var(--gray-500); }

/* ---- Invoice Type Badges ---- */
.badge-tx-credit {
    background: rgba(5,150,105,0.1);
    color: var(--success);
    padding: 3px 10px;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-tx-debit {
    background: rgba(220,38,38,0.1);
    color: var(--danger);
    padding: 3px 10px;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
}

/* ---- Notification Toggle ---- */
.notif-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.notif-toggle:last-child {
    border-bottom: none;
}

.notif-toggle-label {
    flex: 1;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.9rem;
}

/* ---- Signup form ---- */
.signup-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a1628 0%, #145029 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.signup-card {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 800px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.signup-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

@media (max-width: 768px) {
    .wallet-balance { font-size: 2rem; }
    .signup-card { padding: 1.5rem; }
}

/* ============================================
   RFID OCR MODAL
   ============================================ */
.rfid-ocr-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1100;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.rfid-ocr-modal.show { display: flex; }

.rfid-ocr-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.rfid-ocr-dialog {
    position: relative;
    background: #fff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    z-index: 1;
}

.rfid-ocr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.rfid-ocr-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.rfid-ocr-header h5 i { color: var(--primary); }

.rfid-ocr-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
}

.rfid-ocr-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.rfid-ocr-body {
    padding: 1.5rem;
}

.rfid-ocr-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rfid-ocr-buttons .btn-primary-custom,
.rfid-ocr-buttons .btn-secondary-custom {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 1rem;
}

.rfid-ocr-result {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.rfid-ocr-result input {
    border: 2px solid var(--primary) !important;
}

@media (min-width: 576px) {
    .rfid-ocr-buttons {
        flex-direction: row;
    }
}

@media (max-width: 480px) {
    .rfid-ocr-dialog {
        max-height: 95vh;
    }
    .rfid-ocr-body {
        padding: 1rem;
    }
}
