/**
 * Main Custom CSS - Grosir Pulsa
 * Domain: grosirpulsa.web.id
 * Version: 1.0.0
 */

/* ============================================================
   ROOT VARIABLES
   ============================================================ */
:root {
    /* Primary Colors */
    --primary-green: #1e7e34;
    --secondary-green: #28a745;
    --dark-green: #155724;
    --light-green: #34ce57;
    --mint-green: #20c997;
    
    /* Gold Colors */
    --gold: #ffd700;
    --gold-light: #ffed4e;
    --gold-dark: #d4af37;
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    /* Status Colors */
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
    
    /* Layout */
    --sidebar-width: 260px;
    --header-height: 60px;
    --footer-height: 60px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow: 0 4px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.2);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================================
   GLOBAL STYLES
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-100);
    overflow-x: hidden;
}

a {
    color: var(--primary-green);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--dark-green);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--gray-600);
}

.text-primary { color: var(--primary-green) !important; }
.text-secondary { color: var(--secondary-green) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }
.text-muted { color: var(--gray-600) !important; }

.fw-light { font-weight: 300 !important; }
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    transition: all var(--transition);
    border: none;
    font-size: 0.9rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success), var(--mint-green));
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--dark-green);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #c82333);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, var(--info), #138496);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-green);
    color: white;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1.1rem;
}

.btn-rounded {
    border-radius: var(--radius-full);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
}

.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.badge-pill {
    border-radius: var(--radius-full);
    padding: 0.35rem 0.85rem;
}

.badge-soft-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.badge-soft-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.badge-soft-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning);
}

.badge-soft-info {
    background-color: rgba(23, 162, 184, 0.1);
    color: var(--info);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: white;
    border-bottom: 2px solid var(--gray-200);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: var(--gray-100);
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.25rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-control,
.form-select {
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(30, 126, 52, 0.15);
    outline: none;
}

.form-control.is-valid {
    border-color: var(--success);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-text {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.input-group-text {
    background: var(--gray-100);
    border: 2px solid var(--gray-300);
    color: var(--primary-green);
}

/* ============================================================
   TABLES
   ============================================================ */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: white;
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.85rem 1rem;
}

.table tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-color: var(--gray-200);
    font-size: 0.9rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(30, 126, 52, 0.05);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    border: none;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
}

.alert-dismissible .btn-close {
    padding: 1rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(32, 201, 151, 0.1));
    color: var(--dark-green);
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(200, 35, 51, 0.1));
    color: #721c24;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 179, 0, 0.1));
    color: #856404;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1), rgba(19, 132, 150, 0.1));
    color: #0c5460;
    border-left: 4px solid var(--info);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }

.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded { border-radius: var(--radius) !important; }
.rounded-md { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

.bg-primary-gradient {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
}

.bg-gold-gradient {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
}

.bg-success-gradient {
    background: linear-gradient(135deg, var(--success), var(--mint-green));
}

.text-gradient-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Spacing */
.mt-n1 { margin-top: -0.25rem; }
.mt-n2 { margin-top: -0.5rem; }
.mt-n3 { margin-top: -1rem; }
.mb-n1 { margin-bottom: -0.25rem; }
.mb-n2 { margin-bottom: -0.5rem; }
.mb-n3 { margin-bottom: -1rem; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

.animate-slide-up {
    animation: slideUp 0.5s ease;
}

.animate-slide-down {
    animation: slideDown 0.5s ease;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-200);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    .no-print,
    .sidebar,
    .top-navbar,
    .btn,
    .breadcrumb {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1400px) {
    :root {
        --sidebar-width: 240px;
    }
}

@media (max-width: 992px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
    
    .btn {
        padding: 0.4rem 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}