/* Material Design Theme - Override Bootstrap */

:root {
    --md-primary: #1976d2;
    --md-primary-dark: #1565c0;
    --md-primary-light: #42a5f5;
    --md-secondary: #dc004e;
    --md-secondary-dark: #c51162;
    --md-success: #4caf50;
    --md-warning: #ff9800;
    --md-danger: #f44336;
    --md-info: #2196f3;
    --md-surface: #ffffff;
    --md-background: #fafafa;
    --md-text-primary: rgba(0, 0, 0, 0.87);
    --md-text-secondary: rgba(0, 0, 0, 0.6);
}

/* Material Design Typography */
body {
    font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background-color: var(--md-background);
    color: var(--md-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Material Design Elevation (Shadows) */
.card, .modal-content, .dropdown-menu {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.1);
    border: none;
    border-radius: 8px;
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.12), 0 12px 28px rgba(0,0,0,0.15);
}

/* Material Design Buttons */
.btn {
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 10px 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.2), 0 6px 20px rgba(0,0,0,0.19);
    transform: translateY(-1px);
}

.btn:active {
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transform: translateY(0);
}

/* Ripple Effect Simulation */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Primary Button */
.btn-primary {
    background-color: var(--md-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--md-primary-dark);
}

/* Secondary Button */
.btn-secondary {
    background-color: var(--md-secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--md-secondary-dark);
}

/* Success Button */
.btn-success {
    background-color: var(--md-success);
    color: white;
}

.btn-success:hover {
    background-color: #43a047;
}

/* Danger Button */
.btn-danger {
    background-color: var(--md-danger);
    color: white;
}

.btn-danger:hover {
    background-color: #e53935;
}

/* Warning Button */
.btn-warning {
    background-color: var(--md-warning);
    color: white;
}

.btn-warning:hover {
    background-color: #fb8c00;
}

/* Info Button */
.btn-info {
    background-color: var(--md-info);
    color: white;
}

.btn-info:hover {
    background-color: #1e88e5;
}

/* Outline Buttons */
.btn-outline-primary {
    color: var(--md-primary);
    border: 2px solid var(--md-primary);
    box-shadow: none;
}

.btn-outline-primary:hover {
    background-color: var(--md-primary);
    color: white;
}

/* Material Design Forms */
.form-control, .form-select {
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.23);
    padding: 12px 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--md-primary);
    box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: var(--md-text-secondary);
    margin-bottom: 8px;
}

/* Checkbox and Radio */
.form-check-input {
    border-radius: 2px;
    border: 2px solid rgba(0, 0, 0, 0.54);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-check-input:checked {
    background-color: var(--md-primary);
    border-color: var(--md-primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
}

/* Material Design Alerts */
.alert {
    border-radius: 4px;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 16px;
}

.alert-primary {
    background-color: #e3f2fd;
    color: #1565c0;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.alert-danger {
    background-color: #ffebee;
    color: #c62828;
}

.alert-warning {
    background-color: #fff3e0;
    color: #e65100;
}

.alert-info {
    background-color: #e1f5fe;
    color: #01579b;
}

/* Material Design Tables */
.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table thead th {
    background-color: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
    padding: 16px;
}

.table tbody tr {
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.table tbody tr:hover {
    background-color: #f5f5f5;
}

/* Material Design Modal */
.modal-content {
    border-radius: 8px;
}

.modal-header {
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 24px;
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid #e0e0e0;
    padding: 16px 24px;
}

/* Material Design Badge */
.badge {
    border-radius: 12px;
    padding: 4px 12px;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* Material Design Progress Bar */
.progress {
    border-radius: 4px;
    height: 8px;
    background-color: #e0e0e0;
}

.progress-bar {
    background-color: var(--md-primary);
    border-radius: 4px;
}

/* Material Design Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 12px 16px;
}

.nav-link {
    color: var(--md-text-primary);
    font-weight: 500;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Material Design List Group */
.list-group-item {
    border: none;
    border-bottom: 1px solid #e0e0e0;
    padding: 16px;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.list-group-item:hover {
    background-color: #f5f5f5;
}

.list-group-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.list-group-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-bottom: none;
}

/* Material Design Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 12px 0;
}

.breadcrumb-item a {
    color: var(--md-primary);
    text-decoration: none;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.breadcrumb-item a:hover {
    color: var(--md-primary-dark);
}

/* Material Design Pagination */
.pagination {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.page-link {
    border: none;
    color: var(--md-primary);
    padding: 12px 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-link:hover {
    background-color: rgba(25, 118, 210, 0.08);
    color: var(--md-primary-dark);
}

.page-item.active .page-link {
    background-color: var(--md-primary);
    color: white;
}

/* Material Design Spinner */
.spinner-border {
    border-width: 3px;
}

/* Container adjustments */
.container, .container-fluid {
    padding-top: 24px;
    padding-bottom: 24px;
}

/* Headings Material Design Style */
h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    line-height: 1.2;
}

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; }

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Visible (Accessibility) */
*:focus-visible {
    outline: 2px solid var(--md-primary);
    outline-offset: 2px;
}
