/* Theme variables and global utility overrides */
:root {
  --primary: #f26522; /* Trinidad Orange */
  --primary-hover: #e35612; /* Darker Orange */
  --primary-light: #fff4ed; /* Light Orange Tint */
  --secondary: #fef2f2; /* Very light reddish/orange tint */
  --background: #f5fffa; /* Mint Cream / Snow mix */
  --card-bg: #fffafa; /* Snow */
  --text-primary: #1e293b; /* Slate 800 */
  --text-secondary: #64748b; /* Slate 500 */
  --success: #10b981;
  --danger: #ef4444;
  --border: #e2e8f0; /* Slate 200 */
  --font-family: 'Inter', 'Outfit', sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-primary);
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
}

.text-primary-custom { color: var(--primary) !important; }
.bg-primary-custom { background-color: var(--primary) !important; color: white; }

.dashboard-header {
    background-color: var(--primary);
    color: white;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
}

.btn-primary-custom {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn-primary-custom:hover, .btn-primary-custom:active, .btn-primary-custom:focus {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(242, 101, 34, 0.3);
}

.btn-primary-custom:disabled {
    background-color: var(--primary);
    opacity: 0.7;
    box-shadow: none;
}

.btn-outline-custom {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s;
}

.btn-outline-custom:hover {
    background-color: var(--secondary);
    color: var(--text-primary);
}

.text-muted-custom {
    color: var(--text-secondary) !important;
}

/* Base Card Styling */
.portal-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    border: 1px solid var(--border);
    overflow: hidden;
}

.page-transition {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loader Base */
.spinner-border-primary {
    color: var(--primary);
}

/* Global Loader Overlay */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-content {
    text-align: center;
}

/* Jumping Dots Loader */
.jumping-dots-container {
    --uib-size: 50px;
    --uib-color: var(--primary);
    --uib-speed: 1s;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: calc(var(--uib-size) * 0.5);
    width: var(--uib-size);
    margin: 0 auto;
}

.jumping-dot {
    flex-shrink: 0;
    width: calc(var(--uib-size) * 0.17);
    height: calc(var(--uib-size) * 0.17);
    border-radius: 50%;
    background-color: var(--uib-color);
    transition: background-color 0.3s ease;
}

.jumping-dot:nth-child(1) {
    animation: jump var(--uib-speed) ease-in-out calc(var(--uib-speed) * -0.45) infinite;
}

.jumping-dot:nth-child(2) {
    animation: jump var(--uib-speed) ease-in-out calc(var(--uib-speed) * -0.3) infinite;
}

.jumping-dot:nth-child(3) {
    animation: jump var(--uib-speed) ease-in-out calc(var(--uib-speed) * -0.15) infinite;
}

.jumping-dot:nth-child(4) {
    animation: jump var(--uib-speed) ease-in-out infinite;
}

@keyframes jump {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-200%); }
}

.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Button & Card Animations */
.btn-primary-custom {
    position: relative;
    overflow: hidden;
}

.btn-primary-custom:after {
    content: "";
    background: rgba(255, 255, 255, 0.2);
    display: block;
    position: absolute;
    border-radius: 50%;
    padding-top: 240%;
    padding-left: 240%;
    margin-top: -120%;
    margin-left: -120%;
    opacity: 0;
    transition: all 0.8s;
}

.btn-primary-custom:active:after {
    padding-top: 0;
    padding-left: 0;
    margin-top: 0;
    margin-left: 0;
    opacity: 1;
    transition: 0s;
}

.scale-up {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scale-up:hover {
    transform: scale(1.05);
}

.animate-up {
    animation: slideUp 0.6s ease-out forwards;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Navbar */
.navbar-custom {
    background-color: var(--card-bg);
    border-bottom: 2px solid var(--border);
    padding: 0.75rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.navbar-brand {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background-color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    border: 1px solid var(--border);
}

/* Dashboard Specifics */
.profile-stat-box {
    background-color: var(--primary-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
}
.subject-pill {
    background-color: #fff;
    border: 1px solid var(--border);
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 8px;
}
.status-badge {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Auth Cards */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    width: 100%;
    max-width: 420px;
    padding: 3rem 2.5rem;
    text-align: center;
}
.login-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-logo img {
    max-width: 100%;
    height: auto;
}

/* Package List Refinements */
.package-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible !important;
}
.package-card.popular, .package-card.active {
    border: 2px solid var(--primary);
    transform: scale(1.03);
    z-index: 10;
}
.package-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
.package-header {
    background-color: var(--primary);
    color: white;
    padding: 2.25rem 1.5rem;
    text-align: center;
    position: relative; /* Ensure badge can position relative to header */
    border-radius: 11px 11px 0 0; /* Add rounding as card overflow is now visible */
}
.popular-badge {
    position: absolute;
    top: -12px; /* Pull slightly higher */
    left: 50%;
    transform: translateX(-50%);
    background-color: #fbbf24; /* Amber 400 */
    color: #92400e; /* Amber 900 */
    font-size: 0.7rem;
    font-weight: 800;
    padding: 6px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
    z-index: 11;
}
.feature-item {
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.feature-item i {
    color: var(--success);
    font-size: 1.1rem;
}

/* Dashboard Transaction Table */
.transaction-table {
    font-size: 0.9rem;
}
.transaction-table thead th {
    background-color: var(--secondary);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border: none;
    padding: 12px 16px;
}
.transaction-table tbody td {
    padding: 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}
.badge-status {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-status.success { background-color: #dcfce7; color: #166534; }
.badge-status.pending { background-color: #fef9c3; color: #854d0e; }
.badge-status.failed { background-color: #fee2e2; color: #991b1b; }

.cursor-pointer { cursor: pointer; }
.dropdown-item i { transition: transform 0.2s; }
.dropdown-item:hover i { transform: translateX(2px); color: var(--primary); opacity: 1 !important; }
.dropdown-item:active { background-color: var(--primary-light); color: var(--primary); }
