/* Material Design Theme */
.theme-material {
    --md-primary: #1976D2;
    --md-primary-dark: #1565C0;
    --md-primary-light: #BBDEFB;
    --md-accent: #FF4081;
    --md-background: #FAFAFA;
    --md-surface: #FFFFFF;
    --md-text-primary: rgba(0, 0, 0, 0.87);
    --md-text-secondary: rgba(0, 0, 0, 0.54);
    --md-divider: rgba(0, 0, 0, 0.12);
    --md-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --md-shadow-hover: 0 4px 8px rgba(0,0,0,0.15);
    --md-shadow-raised: 0 8px 16px rgba(0,0,0,0.2);
}

/* Material Design Body */
.theme-material body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    background-color: var(--md-background);
    color: var(--md-text-primary);
}

/* Material Design Cards */
.theme-material .card {
    border: none;
    border-radius: 4px;
    box-shadow: var(--md-shadow);
    transition: box-shadow 0.3s ease;
    background-color: var(--md-surface);
}

.theme-material .card:hover {
    box-shadow: var(--md-shadow-hover);
}

.theme-material .card-header {
    background-color: var(--md-surface);
    border-bottom: 1px solid var(--md-divider);
    font-weight: 500;
    font-size: 1.25rem;
    padding: 20px;
}

.theme-material .card-body {
    padding: 20px;
}

/* Material Design Buttons */
.theme-material .btn {
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--md-shadow);
    transition: box-shadow 0.3s ease, transform 0.1s ease;
    border: none;
}

.theme-material .btn:hover {
    box-shadow: var(--md-shadow-hover);
    transform: translateY(-1px);
}

.theme-material .btn:active {
    transform: translateY(0);
    box-shadow: var(--md-shadow);
}

.theme-material .btn-primary {
    background-color: var(--md-primary);
    color: white;
}

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

.theme-material .btn-success {
    background-color: #4CAF50;
    color: white;
}

.theme-material .btn-success:hover {
    background-color: #43A047;
}

.theme-material .btn-warning {
    background-color: #FF9800;
    color: white;
}

.theme-material .btn-warning:hover {
    background-color: #F57C00;
}

.theme-material .btn-danger {
    background-color: #F44336;
    color: white;
}

.theme-material .btn-danger:hover {
    background-color: #E53935;
}

.theme-material .btn-info {
    background-color: #00BCD4;
    color: white;
}

.theme-material .btn-info:hover {
    background-color: #00ACC1;
}

.theme-material .btn-secondary {
    background-color: #9E9E9E;
    color: white;
}

.theme-material .btn-secondary:hover {
    background-color: #757575;
}

.theme-material .btn-link {
    box-shadow: none;
    color: var(--md-primary);
}

.theme-material .btn-sm {
    font-size: 0.875rem;
    padding: 0.375rem 1rem;
}

/* Material Design Form Controls */
.theme-material .form-control,
.theme-material .form-select {
    border: none;
    border-bottom: 1px solid var(--md-divider);
    border-radius: 4px 4px 0 0;
    background-color: rgba(0, 0, 0, 0.04);
    transition: border-color 0.3s ease, background-color 0.3s ease;
    padding: 12px 12px 8px;
}

.theme-material .form-control:focus,
.theme-material .form-select:focus {
    border-bottom: 2px solid var(--md-primary);
    background-color: rgba(0, 0, 0, 0.06);
    box-shadow: none;
    outline: none;
}

.theme-material .form-label {
    font-weight: 500;
    color: var(--md-text-secondary);
    font-size: 0.875rem;
    margin-bottom: 4px;
}

/* Material Design Tables */
.theme-material .table {
    background-color: var(--md-surface);
    border-radius: 4px;
    overflow: hidden;
}

.theme-material .table thead {
    background-color: var(--md-background);
}

.theme-material .table thead th {
    font-weight: 500;
    color: var(--md-text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--md-divider);
    padding: 16px;
}

.theme-material .table tbody tr {
    border-bottom: 1px solid var(--md-divider);
    transition: background-color 0.2s ease;
}

.theme-material .table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.theme-material .table tbody td {
    padding: 16px;
    vertical-align: middle;
}

.theme-material .table-success {
    background-color: rgba(76, 175, 80, 0.1);
}

/* Material Design Navigation */
.theme-material .navbar {
    box-shadow: var(--md-shadow-raised);
    background: linear-gradient(135deg, var(--md-primary) 0%, var(--md-primary-dark) 100%) !important;
}

.theme-material .nav-link {
    transition: background-color 0.2s ease;
    border-radius: 4px;
    margin: 2px 8px;
}

.theme-material .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.theme-material .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Material Design Badges */
.theme-material .badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 12px;
}

/* Material Design Alerts */
.theme-material .alert {
    border: none;
    border-radius: 4px;
    box-shadow: var(--md-shadow);
    border-left: 4px solid;
}

.theme-material .alert-info {
    background-color: #E3F2FD;
    color: #1565C0;
    border-left-color: var(--md-primary);
}

.theme-material .alert-success {
    background-color: #E8F5E9;
    color: #2E7D32;
    border-left-color: #4CAF50;
}

.theme-material .alert-warning {
    background-color: #FFF3E0;
    color: #E65100;
    border-left-color: #FF9800;
}

.theme-material .alert-danger {
    background-color: #FFEBEE;
    color: #C62828;
    border-left-color: #F44336;
}

/* Material Design Spinners */
.theme-material .spinner-border {
    border-color: var(--md-primary);
    border-right-color: transparent;
}

/* Material Design Elevation */
.theme-material .elevation-1 {
    box-shadow: var(--md-shadow);
}

.theme-material .elevation-2 {
    box-shadow: var(--md-shadow-hover);
}

.theme-material .elevation-3 {
    box-shadow: var(--md-shadow-raised);
}

/* Material Design Page Headers */
.theme-material h1, .theme-material h2, .theme-material h3 {
    font-weight: 400;
    color: var(--md-text-primary);
}

.theme-material h4, .theme-material h5, .theme-material h6 {
    font-weight: 500;
    color: var(--md-text-primary);
}

/* Material Design Text */
.theme-material .text-muted {
    color: var(--md-text-secondary) !important;
}

/* Material Design Dividers */
.theme-material hr {
    border-top: 1px solid var(--md-divider);
}

/* Material Design Floating Action Button */
.theme-material .btn-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--md-shadow-raised);
    position: fixed;
    bottom: 24px;
    right: 24px;
}

/* Material Design Transitions */
.theme-material * {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Material Design Button Groups */
.theme-material .btn-group .btn {
    box-shadow: none;
}

.theme-material .btn-group .btn:hover {
    box-shadow: none;
}

/* Material Design Login Page */
.theme-material .login-container {
    background: linear-gradient(135deg, var(--md-primary) 0%, var(--md-primary-dark) 100%);
}

/* Material Design Ripple Effect (Optional - would need JS) */
.theme-material .btn-primary:active::after,
.theme-material .btn-success:active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    to {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}
