/* Custom styles untuk SapiKu dengan warna baru */
:root {
    --primary: #FE7743;
    --secondary: #273F4F;
    --accent: #447D9B;
    --light: #D7D7D7;
    --white: #ffffff;
    --dark: #1a1a1a;
}

/* Global Styles */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--white);
    color: var(--secondary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navigation */
.navbar {
    background: var(--secondary) !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.navbar-brand {
    color: var(--primary) !important;
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    color: var(--light) !important;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.navbar-toggler {
    border: none;
    color: var(--light);
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: rgba(254, 119, 67, 0.1);
    color: var(--primary);
}

/* Hero Section dengan Slider */
.hero-section {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(39, 63, 79, 0.9));
    color: var(--white);
    padding: 40px;
}

.hero-image {
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
}

.slider-nav {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 12px 24px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #e55a2b);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e55a2b, var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(254, 119, 67, 0.3);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--accent), #3a6a84);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #3a6a84, var(--accent));
    transform: translateY(-2px);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: var(--dark);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.btn-outline-light {
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--secondary);
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: var(--white);
    border-radius: 15px 15px 0 0 !important;
    font-weight: 600;
    border: none;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Cattle Cards */
.cattle-card {
    border: 1px solid var(--light);
    transition: all 0.3s ease;
    height: 100%;
}

.cattle-card:hover {
    border-color: var(--primary);
}

.cattle-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.cattle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cattle-card:hover .cattle-image img {
    transform: scale(1.05);
}

.health-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.7em;
    padding: 4px 8px;
    border-radius: 20px;
}

/* Feature Icons */
.feature-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.feature-icon.bg-primary {
    background: linear-gradient(135deg, var(--primary), #e55a2b) !important;
}

/* Tables */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table th {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: var(--white);
    border: none;
    font-weight: 600;
    padding: 15px;
    text-align: left;
}

.table td {
    padding: 12px 15px;
    vertical-align: middle;
    border-color: var(--light);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(215, 215, 215, 0.2);
}

/* Forms */
.form-control, .form-select {
    border: 2px solid var(--light);
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(254, 119, 67, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.form-text {
    font-size: 0.85rem;
}

/* Alert Improvements */
.alert {
    border: none;
    border-radius: 10px;
    padding: 15px 20px;
    border-left: 4px solid;
    margin-bottom: 1rem;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
    border-left-color: #198754;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
    border-left-color: #0dcaf0;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
    border-left-color: #ffc107;
}

/* Modal Styling */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-header {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: var(--white);
    border-radius: 15px 15px 0 0;
    border: none;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

.btn-close {
    filter: invert(1);
}

/* Payment Section */
.payment-methods {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.payment-method {
    flex: 1;
    min-width: 120px;
    border: 2px solid var(--light);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method:hover, .payment-method.active {
    border-color: var(--primary);
    background-color: rgba(254, 119, 67, 0.1);
}

.qr-code {
    max-width: 200px;
    margin: 20px auto;
    padding: 15px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Transaction Details */
.transaction-summary {
    background: var(--light);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ccc;
}

.transaction-total {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary);
    border-top: 2px solid var(--primary);
    padding-top: 10px;
    margin-top: 10px;
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.gallery-thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-thumb:hover {
    transform: scale(1.05);
    border: 2px solid var(--primary);
}

/* Badge Colors */
.badge {
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
}

.badge.bg-primary { background: linear-gradient(135deg, var(--primary), #e55a2b) !important; }
.badge.bg-secondary { background: linear-gradient(135deg, var(--secondary), #1a2d3a) !important; }
.badge.bg-success { background: linear-gradient(135deg, var(--accent), #3a6a84) !important; }
.badge.bg-info { background: linear-gradient(135deg, #17a2b8, #138496) !important; }
.badge.bg-warning { background: linear-gradient(135deg, #ffc107, #e0a800) !important; }
.badge.bg-danger { background: linear-gradient(135deg, #dc3545, #c82333) !important; }

/* Stats Counters */
.counter {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--light);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Chart container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--secondary), #1a2d3a) !important;
    color: var(--light);
    margin-top: auto;
}

footer h5, footer h6 {
    color: var(--white);
    font-weight: 600;
}

footer a {
    color: var(--light);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary);
}

footer ul li {
    margin-bottom: 0.5rem;
}

.social-links a {
    display: inline-block;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: var(--primary);
}

/* Utility Classes */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-slider {
        height: 400px;
    }
    
    .slide-content {
        padding: 20px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .cattle-image {
        height: 150px;
    }
    
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .payment-methods {
        flex-direction: column;
    }
    
    .payment-method {
        min-width: auto;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .d-flex.gap-3 {
        gap: 10px !important;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .hero-slider {
        height: 300px;
    }
    
    .slide-content h1 {
        font-size: 1.5rem;
    }
    
    .slide-content p {
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
    }
    
    .feature-icon i {
        font-size: 1.2rem;
    }
}

/* Print Styles */
@media print {
    .navbar, footer, .btn {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}