/* Premium Tool Management Design System */
:root {
    /* Color Palette */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --success-gradient: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    --info-gradient: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);

    --bg-main: #f1f5f9;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --text-main: #1e293b;
    --text-muted: #64748b;

    --radius-lg: 1.5rem;
    --radius-md: 1rem;
    --radius-sm: 0.5rem;

    --shadow-premium: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 50px -15px rgba(0, 0, 0, 0.15);
}

body {
    background: var(--bg-main);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.15) 0px, transparent 50%);
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
}

/* Glassmorphism Utilities */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    background: rgba(255, 255, 255, 0.85);
}

/* Premium Buttons */
.btn-premium {
    border-radius: var(--radius-md);
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white !important;
}

.btn-premium:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
}

.btn-premium-primary {
    background: var(--primary-gradient);
}

.btn-premium-success {
    background: var(--success-gradient);
}

.btn-premium-warning {
    background: var(--warning-gradient);
}

.btn-premium-danger {
    background: var(--danger-gradient);
}

.btn-premium-info {
    background: var(--info-gradient);
}

/* Dashboard Title */
.dashboard-title-modern {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0;
}

/* Statistics Widgets */
.stat-widget {
    padding: 1.5rem;
    text-align: center;
}

.stat-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.2);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Modern Data Table */
.modern-table-wrapper {
    overflow: hidden;
    border-radius: var(--radius-md);
}

.table-premium {
    margin-bottom: 0;
}

.table-premium thead th {
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 2px solid var(--glass-border);
    padding: 1.2rem 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.table-premium tbody td {
    padding: 1.2rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--glass-border);
}

.table-premium tbody tr:last-child td {
    border-bottom: none;
}

.table-premium tbody tr {
    transition: all 0.2s ease;
}

.table-premium tbody tr:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Status Badges Premium */
.badge-premium {
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-weight: 600;
    font-size: 0.8rem;
}

.badge-in {
    background: #dcfce7;
    color: #166534;
}

.badge-out {
    background: #fee2e2;
    color: #991b1b;
}

/* Tool Selection Grid Modern */
.tool-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
    padding: 0.5rem;
}

.tool-card-modern {
    background: white;
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tool-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #6366f1;
}

.tool-card-modern.selected {
    background: #f5f3ff;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px #6366f1;
}

.tool-card-modern.selected .selection-indicator {
    opacity: 1;
    transform: scale(1);
}

.tool-image-wrapper {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: #f8fafc;
}

.tool-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tool-card-modern:hover .tool-image-wrapper img {
    transform: scale(1.1);
}

.tool-name-modern {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-sn-modern {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

.selection-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #6366f1;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid white;
}

/* Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-title-modern {
        font-size: 1.8rem;
    }
}