:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --dark-color: #212529;
}

body {
    background-color: #f8f9fa;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.navbar-brand {
    font-weight: 600;
}

.drive-visual {
    display: inline-block;
    width: 40px;
    height: 30px;
    background-color: #6c757d;
    border: 1px solid #495057;
    border-radius: 3px;
    margin: 2px;
    position: relative;
    text-align: center;
    line-height: 30px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.drive-visual.data {
    background-color: var(--primary-color);
}

.drive-visual.parity {
    background-color: var(--warning-color);
    color: black;
}

.drive-visual.mirror {
    background-color: var(--success-color);
}

.drive-visual.stripe {
    background-color: var(--info-color);
    color: black;
}

.drive-visual.data-parity {
    background: linear-gradient(45deg, var(--primary-color) 50%, var(--warning-color) 50%);
    color: white;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.drive-visual.stripe-mirror {
    background-color: #6f42c1;
    color: white;
}

.drive-type-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.drive-type-hdd {
    background-color: #6f42c1;
    color: white;
}

.drive-type-ssd {
    background-color: #20c997;
    color: white;
}

.drive-type-nvme {
    background-color: #fd7e14;
    color: white;
}

.drive-type-specialty {
    background-color: #e83e8c;
    color: white;
}

.interface-badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 0.25rem;
}

.interface-sata {
    background-color: #6c757d;
    color: white;
}

.interface-sas {
    background-color: #0d6efd;
    color: white;
}

.interface-nvme {
    background-color: #dc3545;
    color: white;
}

.cache-boost-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.cache-options-card {
    border-left: 4px solid #17a2b8;
}

.cache-compatibility .alert {
    border-left: 4px solid #28a745;
    background-color: #f8f9fa;
}

.cache-status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #17a2b8;
    color: white;
    margin-right: 0.25rem;
}

.performance-boost {
    font-size: 0.875rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.cache-drive-visual {
    display: inline-block;
    width: 30px;
    height: 20px;
    background-color: #17a2b8;
    border: 1px solid #138496;
    border-radius: 2px;
    margin: 1px;
    text-align: center;
    line-height: 20px;
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.cache-drive-visual.read-cache {
    background-color: #28a745;
    border-color: #1e7e34;
}

.cache-drive-visual.write-cache {
    background-color: #fd7e14;
    border-color: #e8610d;
}

.cache-drive-visual.tiering {
    background-color: #6f42c1;
    border-color: #59359a;
}

.performance-indicator {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.performance-excellent {
    background-color: #d1e7dd;
    color: #0a3622;
}

.performance-good {
    background-color: #d1ecf1;
    color: #055160;
}

.performance-fair {
    background-color: #fff3cd;
    color: #664d03;
}

.performance-poor {
    background-color: #f8d7da;
    color: #58151c;
}

/* Complete Storage Layout Styles */
.complete-storage-layout {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.storage-tier {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

.drive-visual-complete {
    display: inline-block;
    width: 50px;
    height: 60px;
    margin: 3px;
    border-radius: 6px;
    text-align: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.drive-visual-complete .drive-label {
    margin-top: 8px;
    font-size: 11px;
}

.drive-visual-complete .drive-type {
    font-size: 8px;
    opacity: 0.8;
    margin-top: 2px;
}

.cache-drive-visual-complete {
    display: inline-block;
    width: 50px;
    height: 60px;
    margin: 3px;
    border-radius: 6px;
    text-align: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.cache-drive-visual-complete .drive-label {
    margin-top: 8px;
    font-size: 11px;
}

.cache-drive-visual-complete .drive-type {
    font-size: 8px;
    opacity: 0.8;
    margin-top: 2px;
}

.cache-drive-visual-complete.read-cache {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.cache-drive-visual-complete.write-cache {
    background: linear-gradient(135deg, #28a745, #155724);
}

/* Tier Drive Styles */
.tier-drive-visual {
    display: inline-block;
    width: 50px;
    height: 60px;
    margin: 3px;
    border-radius: 6px;
    text-align: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.tier-drive-visual .drive-label {
    margin-top: 8px;
    font-size: 10px;
}

.tier-drive-visual .drive-type {
    font-size: 8px;
    opacity: 0.8;
    margin-top: 2px;
}

.tier-drive-visual.tier1 {
    background: linear-gradient(135deg, #dc3545, #bd2130);
}

.tier-drive-visual.tier2 {
    background: linear-gradient(135deg, #fd7e14, #e55100);
}

.tier-drive-visual.tier3 {
    background: linear-gradient(135deg, #6f42c1, #563d7c);
}

.tier-section {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px;
}

.tier-header {
    color: #495057;
    font-size: 14px;
}

/* Enhanced drive visual colors for primary array */
.drive-visual-complete.data {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.drive-visual-complete.mirror {
    background: linear-gradient(135deg, #6610f2, #520dc2);
}

.drive-visual-complete.parity {
    background: linear-gradient(135deg, #e83e8c, #d91a72);
}

.drive-visual-complete.stripe {
    background: linear-gradient(135deg, #20c997, #1e7e34);
}

.drive-visual-complete.data-parity {
    background: linear-gradient(45deg, var(--primary-color) 50%, var(--warning-color) 50%);
    color: white;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.drive-visual-complete.stripe-mirror {
    background: linear-gradient(135deg, #6f42c1, #5a32a3);
    color: white;
}

/* Input Validation Styles */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545' stroke-width='1.5'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m4.5 4.5 3 3m-3 0 3-3'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
    font-weight: 500;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #198754;
    font-weight: 500;
}

.form-group.has-error {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Enhanced Validation Styles */
.form-control.is-invalid {
    background-color: #fff5f5;
    animation: inputShake 0.3s ease-in-out;
}

.form-select.is-invalid {
    background-color: #fff5f5;
    animation: inputShake 0.3s ease-in-out;
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.invalid-feedback {
    animation: fadeInDown 0.3s ease-out;
}

.valid-feedback {
    animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Focus States */
.form-control:focus {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Input Group Validation Fixes */
.input-group .form-control.is-invalid {
    z-index: 4;
}

.input-group .form-control.is-invalid + .form-select,
.input-group .form-control.is-invalid ~ .form-select {
    border-left: 0;
    border-color: #dc3545;
}

/* Ensure input group stays on same line */
.input-group .form-control.is-invalid {
    background-position: right calc(0.375em + 0.1875rem) center;
}

.input-group .form-select {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Prevent layout shift when validation states change */
.input-group {
    display: flex !important;
    flex-wrap: nowrap !important;
}

.input-group > .form-control,
.input-group > .form-select {
    flex: 1 1 auto;
}

.input-group > .form-select {
    flex: 0 0 auto;
    width: auto;
    min-width: 100px;
}

/* Loading State for Validation */
.form-control.validating {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%236c757d' d='M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm0 1A5 5 0 1 1 8 3a5 5 0 0 1 0 10z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Security Alert Styling */
.security-alert {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.security-alert.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.raid-info-item {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 0.375rem;
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 0.125rem solid rgba(0, 0, 0, 0.1);
    border-top: 0.125rem solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .drive-visual {
        width: 30px;
        height: 25px;
        line-height: 25px;
        font-size: 10px;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Cookie Consent Banner Styles */
.cookie-consent {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%);
    border-top: 3px solid var(--warning-color);
    backdrop-filter: blur(10px);
    animation: slideUp 0.5s ease-out;
}

.cookie-consent .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.cookie-consent .btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: #212529;
    font-weight: 600;
}

.cookie-consent .btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
    color: #212529;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile cookie banner adjustments */
@media (max-width: 768px) {
    .cookie-consent .container .row {
        text-align: center;
    }
    
    .cookie-consent .d-flex.gap-2 {
        justify-content: center !important;
        margin-top: 15px;
    }
    
    .cookie-consent .btn {
        flex: 1;
        max-width: 150px;
    }
}

/* Toast notification positioning fix for mobile */
@media (max-width: 576px) {
    .toast.position-fixed {
        left: 10px !important;
        right: 10px !important;
        top: 10px !important;
        width: auto !important;
    }
}
