/*
 * IAAS Modern Theme - Custom Styles
 * Modern Infrastructure-as-a-Service Design Overrides
 */

:root {
  --iaas-primary: #2563eb;
  --iaas-secondary: #64748b;
  --iaas-accent: #06b6d4;
  --iaas-success: #10b981;
  --iaas-warning: #f59e0b;
  --iaas-danger: #ef4444;
  --iaas-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --iaas-gradient-2: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --iaas-gradient-3: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* Global Enhancements */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
}

/* Immediate Visual Indicator */
.header {
  background: var(--iaas-gradient) !important;
  color: white !important;
}

.header .navbar-brand {
  color: white !important;
  font-weight: 800 !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Header Enhancements */
.header {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  background: white;
}

.header .topbar {
  background: var(--iaas-gradient);
  padding: 8px 0;
}

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

.header .navbar-brand::before {
  content: '☁️';
  margin-right: 8px;
}

/* Navigation */
.navbar-nav .nav-link {
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 6px;
  margin: 0 4px;
}

.navbar-nav .nav-link:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--iaas-primary);
}

/* Tile Styling */
.tiles .tile {
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  transition: all 0.3s ease;
  background: white;
  border: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}

.tiles .tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--iaas-gradient);
}

.tiles .tile:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
}

.tiles .tile .icon {
  font-size: 2.5rem;
  background: var(--iaas-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tiles .tile .stat {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1e293b;
}

.tiles .tile .title {
  font-weight: 600;
  color: var(--iaas-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.875rem;
}

/* Card Enhancements */
.card {
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  transition: all 0.3s ease;
  background: white;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
}

.card-header {
  background: var(--iaas-gradient);
  color: white;
  border-radius: 16px 16px 0 0;
  font-weight: 600;
  border: none;
}

.card-title {
  font-weight: 700;
  color: #1e293b;
}

/* Button Styling */
.btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--iaas-gradient);
  border: none;
  box-shadow: 0 4px 6px -1px rgb(37 99 235 / 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgb(37 99 235 / 0.4);
}

.btn-success {
  background: var(--iaas-gradient-3);
  border: none;
}

.btn-info {
  background: var(--iaas-gradient-2);
  border: none;
}

/* Form Enhancements */
.form-control {
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--iaas-primary);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

/* Table Styling */
.table {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.table thead th {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  font-weight: 600;
  color: #374151;
  border: none;
}

.table tbody tr:hover {
  background: rgba(37, 99, 235, 0.05);
}

/* Alert Styling */
.alert {
  border-radius: 12px;
  border: none;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.alert-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
  border-left: 4px solid var(--iaas-success);
}

.alert-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
  border-left: 4px solid var(--iaas-danger);
}

.alert-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
  border-left: 4px solid var(--iaas-warning);
}

.alert-info {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(8, 145, 178, 0.1) 100%);
  border-left: 4px solid var(--iaas-accent);
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #cbd5e1;
  margin-top: 4rem;
}

.footer .nav-link {
  color: #94a3b8;
  transition: color 0.3s ease;
}

.footer .nav-link:hover {
  color: white;
}

/* Sidebar */
.sidebar .nav-link {
  border-radius: 8px;
  margin-bottom: 4px;
  transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--iaas-primary);
  transform: translateX(4px);
}

.sidebar .nav-link.active {
  background: var(--iaas-gradient);
  color: white;
}

/* Breadcrumb */
.breadcrumb {
  background: rgba(248, 250, 252, 0.8);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive */
@media (max-width: 768px) {
  .tiles .tile {
    margin-bottom: 1rem;
  }
  
  .tiles .tile .icon {
    font-size: 2rem;
  }
  
  .tiles .tile .stat {
    font-size: 2rem;
  }
}