/* 
 * Ablev Corporation Stylesheet
 * Corporate Portal Design System
 */

:root {
    --primary-teal: #58b8b2;
    --secondary-green: #9ce692;
    --accent-blue: #4a90e2;
    --dark-blue: #2c3e50;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --dark-gray: #343a40;
    --white: #ffffff;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --sidebar-width: 250px;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--secondary-green) 100%);
    min-height: 100vh;
    color: var(--dark-gray);
}

/* Typography */
.ablev-logo {
    color: var(--primary-teal) !important;
    font-weight: bold;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark-blue);
    font-weight: 600;
}

/* Landing Page Styles */
.landing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
    width: 100%;
    max-width: 400px;
    margin-bottom: 30px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    background: var(--dark-blue);
    color: var(--white);
    padding: 30px;
    text-align: center;
}

.logo {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-teal);
}

.subtitle {
    font-size: 0.9em;
    opacity: 0.8;
}

.auth-body {
    padding: 30px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: var(--dark-gray);
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-teal);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-teal);
    color: var(--white);
}

.btn-primary:hover {
    background: #45a399;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-green);
    color: var(--dark-blue);
}

.btn-secondary:hover {
    background: #89d67a;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #c82333;
}

.btn-full-width {
    width: 100%;
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: none;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Security Info Box */
.security-info {
    background: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid var(--primary-teal);
}

.security-info h4 {
    color: var(--dark-blue);
    margin-bottom: 10px;
    font-size: 1.1em;
}

.security-info ul {
    margin-left: 20px;
    color: var(--medium-gray);
}

.security-info li {
    margin-bottom: 5px;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 30px;
    color: var(--white);
    font-size: 0.9em;
}

.footer a {
    color: var(--secondary-green);
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: var(--light-gray);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark-blue);
    color: var(--white);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 20px;
    background: var(--dark-blue);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 1.5em;
    margin-bottom: 5px;
    color: var(--primary-teal);
}

.sidebar-header p {
    font-size: 0.9em;
    opacity: 0.8;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: block;
    padding: 12px 20px;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--secondary-green);
}

.nav-item i {
    margin-right: 10px;
    width: 20px;
}

.user-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--dark-blue);
    margin-bottom: 10px;
}

.user-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.user-role {
    font-size: 0.8em;
    opacity: 0.7;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    background: var(--light-gray);
}

.main-content.expanded {
    margin-left: 0;
}

.topbar {
    background: var(--white);
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--dark-gray);
    padding: 5px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-btn {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: var(--medium-gray);
    position: relative;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.3s;
}

.notification-btn:hover {
    background: var(--light-gray);
}

.notification-btn::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
}

.content-area {
    padding: 30px;
}

.page-title {
    font-size: 2em;
    margin-bottom: 30px;
    color: var(--dark-blue);
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.1s ease;
    cursor: pointer;
}

.dashboard-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.5em;
    color: var(--white);
}

.card-icon.primary {
    background: var(--primary-teal);
}

.card-icon.secondary {
    background: var(--secondary-green);
    color: var(--dark-blue);
}

.card-icon.accent {
    background: var(--accent-blue);
}

.card-icon.warning {
    background: var(--warning);
    color: var(--dark-blue);
}

.card-title {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 5px;
}

.card-subtitle {
    color: var(--medium-gray);
    font-size: 0.9em;
}

.card-content {
    color: var(--dark-gray);
}

.card-action {
    margin-top: 15px;
    padding: 10px 20px;
    background: var(--primary-teal);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.card-action:hover {
    background: #45a399;
}

.card-action.secondary {
    background: var(--secondary-green);
    color: var(--dark-blue);
}

.card-action.secondary:hover {
    background: #89d67a;
}

/* Quick Actions */
.quick-actions {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.quick-actions h3 {
    color: var(--dark-blue);
    margin-bottom: 20px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.action-item {
    background: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.1s ease;
    border: 2px solid transparent;
}

.action-item:hover {
    background: var(--primary-teal);
    color: var(--white);
}

.action-item i {
    font-size: 2em;
    margin-bottom: 10px;
    display: block;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .topbar {
        padding: 15px 20px;
    }
    
    .content-area {
        padding: 20px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    
    .auth-card {
        margin: 15px;
    }
    
    .auth-header {
        padding: 20px;
    }
    
    .auth-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 2em;
    }
    
    .page-title {
        font-size: 1.5em;
    }
    
    .dashboard-card {
        padding: 20px;
    }
    
    .quick-actions {
        padding: 20px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.dashboard-card {
    animation: fadeIn 0.5s ease-out;
}

.dashboard-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-card:nth-child(2) { animation-delay: 0.2s; }
.dashboard-card:nth-child(3) { animation-delay: 0.3s; }
.dashboard-card:nth-child(4) { animation-delay: 0.4s; }

/* Loading States */
.loading {
    position: relative;
    color: transparent;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--light-gray);
    border-top-color: var(--primary-teal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}