:root {
    --primary-red: #E30613;
    --primary-dark: #B71C1C;
    --primary-light: #FFCDD2;
    --accent-color: #ffffff;
    --bg-body: #f4f6f9;
    --text-main: #333333;
    --text-muted: #777777;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --box-shadow-hover: 0 15px 35px rgba(var(--primary-rgb), 0.15);
    --transition-speed: 0.3s;
    --font-heading: 'Roboto', sans-serif;
    --font-body: 'Roboto', sans-serif;
    /* Unified font for cleaner look */
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
    /* Prevent horizontal scroll from animations */
}

/* Animations Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(var(--primary-rgb), 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0);
    }
}

/* Auth Pages (Login/Register) */
/* Auth Pages (Login/Register) */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    /* Default Black Background */
    background: #000000;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 10%, transparent 10.5%);
    background-size: 30px 30px;
    top: -25%;
    left: -25%;
    animation: rotateBackground 60s linear infinite;
    pointer-events: none;
}

@keyframes rotateBackground {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.auth-box {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 420px;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.8s ease-out;
}

.auth-header h1 {
    color: var(--primary-red);
    font-size: 2.2rem;
    margin: 10px 0;
    font-weight: 800;
    letter-spacing: -1px;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: all var(--transition-speed);
    background: #fdfdfd;
}

.form-control:focus {
    border-color: var(--primary-red);
    outline: none;
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
    background: white;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    /* Pill shape */
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-speed);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-dark) 100%);
    color: white;
    width: 100%;
    /* For block buttons */
}

/* Allow width auto for specific cases */
.action-bar .btn,
.modal-footer .btn,
.top-bar .btn,
.user-profile .btn-logout {
    width: auto;
}

.btn-secondary {
    background: #333;
    color: white;
}

.btn-edit {
    background: #ffb300;
    color: #fff;
}

.btn-delete {
    background: #e53935;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
    box-shadow: none;
}

/* Action Buttons Container for Desktop */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.action-buttons .btn {
    margin: 0 !important;
}

.action-buttons form {
    margin: 0;
    display: inline-flex;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.03);
    z-index: 10;
    animation: slideInLeft 0.5s ease-out;
}

.logo-area {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #f9f9f9 100%);
    border-bottom: 1px solid #eee;
}

.logo-text {
    color: var(--primary-red);
    font-weight: 900;
    font-size: 1.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.nav-links {
    list-style: none;
    padding: 1.5rem;
    margin: 0;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: 0.8rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 10px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.nav-link i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.nav-link:hover {
    background-color: #fff0f0;
    color: var(--primary-red);
    transform: translateX(5px);
}

.nav-link:hover i {
    transform: scale(1.1);
}

.nav-link.active {
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}

.sidebar-footer {
    padding: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: #aaa;
    border-top: 1px solid #eee;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #f4f7fa;
    /* Slightly blue-ish grey for modern feel */
    overflow-y: auto;
}

.top-bar {
    background: white;
    /* Glassmorphism effect */
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 5;
}

.page-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-profile strong {
    color: var(--primary-red);
}

.btn-logout {
    background: transparent;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: var(--primary-red);
    color: white;
}

.content-area {
    padding: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    animation: fadeIn 0.6s ease-out;
}

/* Stats Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

@media (min-width: 1024px) {
    .dashboard-cards.five-cols {
        grid-template-columns: repeat(5, 1fr);
        gap: 15px;
    }

    .dashboard-cards.five-cols .card-stat {
        padding: 15px;
    }

    .dashboard-cards.five-cols .card-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        margin-right: 12px;
    }

    .dashboard-cards.five-cols .card-info h3 {
        font-size: 1.5rem;
    }

    .dashboard-cards.five-cols .card-info p {
        font-size: 0.7rem;
    }
}

.card-stat {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-stat:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.card-stat::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 100px;
    height: 100px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 50%;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-right: 20px;
    flex-shrink: 0;
}

/* Define updated icon colors */
.icon-blue {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.icon-green {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.icon-orange {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

.icon-purple {
    background: rgba(156, 39, 176, 0.1);
    color: #9C27B0;
}

.card-info h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
}

.card-info p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* Quick Actions Grid */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.action-card {
    background: white;
    border: none;
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.action-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-hover);
}

.action-card:hover i {
    transform: scale(1.2) rotate(5deg);
    color: var(--primary-dark);
}

.action-card i {
    font-size: 40px;
    margin-bottom: 15px;
    color: var(--primary-red);
    transition: all 0.3s ease;
    display: block;
}

.action-card span {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Tables */
.table-responsive {
    background: white;
    border-radius: 16px;
    padding: 0;
    box-shadow: var(--box-shadow);
    overflow-x: auto;
    margin-top: 30px;
    animation: fadeIn 0.8s ease-out;
    -webkit-overflow-scrolling: touch;
}

/* Scrollbar styling for better UX */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.table-responsive table {
    width: 100%;
    min-width: max-content;
    /* Critical: Table expands to fit content, triggering scroll */
}

.table-responsive th,
.table-responsive td {
    white-space: nowrap;
    padding: 12px 15px !important;
    /* Override global padding */
    font-size: 0.85rem;
}

/* Better mobile experience */
@media (max-width: 768px) {

    .table-responsive th,
    .table-responsive td {
        padding: 10px 8px !important;
        font-size: 0.75rem;
    }

    .btn-sm {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

thead {
    background-color: #f9fafb;
}

th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #eee;
}

td {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    color: #444;
}

tbody tr {
    transition: background-color 0.2s;
}

tbody tr:hover {
    background-color: #fff8f8;
    /* Very light red tint */
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1005;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border: none;
    width: 90%;
    max-width: 550px;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.modal-content h2 {
    background: var(--primary-red);
    color: white;
    margin: 0;
    padding: 20px 25px;
    font-size: 1.4rem;
}

.modal-form {
    padding: 25px;
}

.close {
    color: rgba(255, 255, 255, 0.8);
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 30px;
    font-weight: bold;
    transition: color 0.2s;
}

.close:hover {
    color: white;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

.badge-votante {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.badge-admin {
    background-color: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffe0b2;
}

.badge-lider {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.badge-operador {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #e1bee7;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
}

.profile-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    transition: color 0.3s;
    font-size: 2.2rem;
}

.profile-btn:hover {
    color: var(--primary-red);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 120%;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 100;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-content a {
    color: #444;
    padding: 14px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.dropdown-content a:hover {
    background-color: #fceceb;
    color: var(--primary-red);
}

.show-dropdown {
    display: block;
}

/* Staggered Table Animations */
tbody tr {
    animation: fadeIn 0.5s ease-out backwards;
}

tbody tr:nth-child(1) {
    animation-delay: 0.1s;
}

tbody tr:nth-child(2) {
    animation-delay: 0.15s;
}

tbody tr:nth-child(3) {
    animation-delay: 0.2s;
}

tbody tr:nth-child(4) {
    animation-delay: 0.25s;
}

tbody tr:nth-child(5) {
    animation-delay: 0.3s;
}

tbody tr:nth-child(6) {
    animation-delay: 0.35s;
}

tbody tr:nth-child(7) {
    animation-delay: 0.4s;
}

tbody tr:nth-child(8) {
    animation-delay: 0.45s;
}

tbody tr:nth-child(9) {
    animation-delay: 0.5s;
}

tbody tr:nth-child(10) {
    animation-delay: 0.55s;
}

/* Logo Animation */
.logo-area img {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sidebar:hover .logo-area img {
    transform: rotate(5deg) scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .main-content {
        padding: 0;
    }

    .content-area {
        padding: 1.5rem;
    }
}


/* Mobile Dashboard Optimizations (Max Width 600px) */
@media (max-width: 600px) {

    /* 1. Stats Cards: 2 Columns Grid */
    .dashboard-cards {
        display: grid;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px;
        margin-bottom: 25px;
    }

    /* Make the first card (Total) span full width for emphasis */
    .dashboard-cards .card-stat:first-child {
        grid-column: span 2;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        border: 1px solid #e9ecef;
    }

    .card-stat {
        padding: 15px;
        min-height: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .card-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .card-info h3 {
        font-size: 1.5rem;
        margin: 0;
        line-height: 1.2;
    }

    .card-info p {
        font-size: 0.75rem;
        margin-top: 4px;
        white-space: nowrap;
    }

    /* 2. Action Buttons: 2 Columns Grid */
    .action-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
    }

    .action-buttons .btn,
    .action-buttons form,
    .action-buttons label {
        width: 100% !important;
        margin: 0 !important;
        font-size: 0.8rem;
        padding: 10px 5px;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        min-height: 45px;
        border-radius: 8px;
        /* Softer look */
    }

    /* Form fix within grid */
    .action-buttons form {
        display: flex;
        /* Ensure it takes grid slot */
        padding: 0;
        /* Reset form padding, let label handle it */
        background: transparent;
        box-shadow: none;
    }

    .action-buttons form label {
        width: 100%;
        height: 100%;
        cursor: pointer;
        display: flex;
    }

    .btn i {
        margin-right: 6px;
    }
}

/* ============================================
   MOBILE DASHBOARD STYLES
   ============================================ */

/* Mobile Dashboard Container */
.mobile-dashboard-view {
    display: none;
    /* Hidden by default, shown on mobile via media query */
    min-height: 100vh;
    background: linear-gradient(135deg, #E30613 0%, #B71C1C 100%);
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    padding: 20px 15px;
}

/* Background Animation */
.mobile-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Orbit Header Section */
.orbit-header {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 20px 10px;
    margin-bottom: 30px;
}

.orbit-system {
    position: relative;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

.orbit-center {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    }
}

.pulse-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.mobile-app-title {
    color: white;
    font-size: clamp(1.3rem, 5vw, 1.8rem);
    font-weight: 700;
    margin: 15px 0 0 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

/* Orbit Tracks (Optional decorative elements) */
.orbit-track {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.track-1 {
    width: 120px;
    height: 120px;
}

.track-2 {
    width: 160px;
    height: 160px;
}

.track-3 {
    width: 200px;
    height: 200px;
}

.orbit-bubble {
    position: absolute;
    width: 25px;
    height: 25px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.orbit-bubble img {
    width: 15px;
    height: 15px;
    opacity: 0.6;
}

.bubble-1 {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.bubble-2 {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
}

.bubble-3 {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Mobile Grid Menu */
.mobile-grid-menu {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 5px;
}

/* Grid Items */
.grid-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 18px 10px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-height: 95px;
    position: relative;
    overflow: hidden;
}

.grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grid-item:active::before {
    opacity: 1;
}

.grid-item:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.grid-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.grid-item span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
    word-break: break-word;
    hyphens: auto;
}

.logout-item .grid-icon {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

/* Responsive adjustments for very small screens (Android) */
@media (max-width: 360px) {
    .mobile-dashboard-view {
        padding: 15px 10px;
    }

    .orbit-header {
        padding: 15px 5px;
        margin-bottom: 20px;
    }

    .orbit-center {
        width: 70px;
        height: 70px;
    }

    .pulse-logo {
        width: 50px;
        height: 50px;
    }

    .mobile-app-title {
        font-size: 1.2rem;
    }

    .mobile-grid-menu {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 10px;
        padding: 0;
    }

    .grid-item {
        padding: 14px 8px;
        min-height: 85px;
        border-radius: 14px;
    }

    .grid-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        border-radius: 10px;
    }

    .grid-item span {
        font-size: 0.7rem;
    }
}

/* Extra small screens */
@media (max-width: 320px) {
    .mobile-grid-menu {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .grid-item {
        padding: 12px 6px;
        min-height: 80px;
    }

    .grid-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .grid-item span {
        font-size: 0.65rem;
    }
}