/* ============================================
   AMCRAM - Custom Styles
   Modern, Minimal & Responsive Design
   Amcor Brand Colors
   ============================================ */

:root {
    --primary-color: #003366;
    --primary-dark: #002244;
    --secondary-color: #00a5b5;
    --secondary-dark: #008a99;
    --accent-color: #00c4b4;
    --success-color: #00a5b5;
    --info-color: #00c4b4;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f5f8fa;
    --border-color: #d1e3ed;
    --text-primary: #003366;
    --text-secondary: #5a7a94;
    --shadow-sm: 0 1px 2px 0 rgb(0 51 102 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 51 102 / 0.1), 0 2px 4px -2px rgb(0 51 102 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 51 102 / 0.1), 0 4px 6px -4px rgb(0 51 102 / 0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Navbar Styles
   ============================================ */

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.navbar {
    padding: 0.5rem 0;
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

/* ============================================
   Card Styles
   ============================================ */

.card {
    border-radius: 12px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-1px);
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    padding: 0.6rem 1rem;
}

.card-header h5 {
    font-size: 0.9rem;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004d80 100%) !important;
}

.card-header.bg-secondary {
    background: linear-gradient(135deg, #5a7a94 0%, #6d8fa8 100%) !important;
}

.card-header.bg-info {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%) !important;
}

.card-body {
    padding: 0.75rem 1rem;
}

/* ============================================
   Drop Zone Styles
   ============================================ */

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, #f5f8fa 0%, #e8f4f8 100%);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.drop-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.05) 0%, rgba(0, 165, 181, 0.05) 100%);
    opacity: 0;
    transition: var(--transition);
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, #e6f7f8 0%, #d9f2f4 100%);
}

.drop-zone:hover::before,
.drop-zone.drag-over::before {
    opacity: 1;
}

.drop-zone.drag-over {
    transform: scale(1.01);
    box-shadow: 0 0 0 3px rgba(0, 165, 181, 0.2);
}

.drop-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    opacity: 0.8;
    transition: var(--transition);
}

.drop-zone:hover .drop-icon {
    transform: scale(1.1);
    opacity: 1;
}

.drop-zone-content,
.drop-zone-loading {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.drop-zone-content .btn {
    pointer-events: auto;
}

/* ============================================
   Form Styles
   ============================================ */

.form-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.form-control {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    transition: var(--transition);
    background-color: #fff;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(0, 165, 181, 0.15);
}

.form-control[readonly] {
    background-color: var(--light-bg);
    cursor: default;
}

.input-group-text {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 6px 0 0 6px;
    color: var(--text-secondary);
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
}

.input-group .form-control {
    border-radius: 0 6px 6px 0;
}

/* ============================================
   Table Styles
   ============================================ */

.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 0.75rem;
}

.table tbody td {
    padding: 0.5rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

.table tbody tr:hover {
    background-color: rgba(0, 51, 102, 0.03);
}

.cylinder-number {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.7rem;
    margin: 0 auto;
}

/* ============================================
   Button Styles
   ============================================ */

.btn {
    border-radius: 6px;
    padding: 0.4rem 1rem;
    font-weight: 500;
    font-size: 0.85rem;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary-color) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-outline-secondary {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline-secondary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

/* ============================================
   Badge Styles
   ============================================ */

.badge {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

/* ============================================
   Toast Styles
   ============================================ */

.toast {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Footer Styles
   ============================================ */

.footer {
    margin-top: auto;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

#form-section .card {
    animation: fadeIn 0.5s ease forwards;
}

#form-section .card:nth-child(1) {
    animation-delay: 0.1s;
}

#form-section .card:nth-child(2) {
    animation-delay: 0.2s;
}

#form-section .card:nth-child(3) {
    animation-delay: 0.3s;
}

#form-section .card:nth-child(4) {
    animation-delay: 0.4s;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
    .drop-zone {
        padding: 3rem 1.5rem;
    }
    
    .drop-icon {
        font-size: 3rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        width: 100%;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-header h5 {
        font-size: 1rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* ============================================
   Color Classes for Cylinder Types
   ============================================ */

.type-dul {
    background-color: #e0f2f4;
    color: #003366;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8rem;
}

.type-pec {
    background-color: #fff4e6;
    color: #92400e;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8rem;
}

.type-dul-pec {
    background: linear-gradient(135deg, #e0f2f4 0%, #fff4e6 100%);
    color: #003366;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8rem;
}

.type-bright {
    background-color: #d9f7f4;
    color: #00796b;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8rem;
}

/* ============================================
   Loading State
   ============================================ */

.spinner-border {
    width: 3rem;
    height: 3rem;
}

.processing {
    pointer-events: none;
    opacity: 0.7;
}
