/* TALLY ERP STYLE LOGIN CSS */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.4;
}

/* Tally ERP Login Wrapper */
.tally-erp-login {
    min-height: 100vh;
    background: linear-gradient(135deg, #e8f4f8 0%, #f0f8ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tally-login-container {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.tally-login-wrapper {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

/* Tally Header Section */
.tally-header {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3d72 100%);
    color: white;
    padding: 20px 25px;
    text-align: center;
}

.tally-logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.tally-logo {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    background: white;
    padding: 6px;
    object-fit: contain;
}

.tally-brand-info {
    text-align: center;
}

.tally-brand-name {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}

.tally-brand-tagline {
    font-size: 11px;
    opacity: 0.9;
    margin: 3px 0 0 0;
    font-weight: 400;
}

/* Tally Login Box */
.tally-login-box {
    padding: 25px 20px 20px 20px;
}

.tally-login-header {
    text-align: center;
    margin-bottom: 20px;
}

.tally-login-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c5aa0;
    margin: 0 0 6px 0;
}

.tally-login-subtitle {
    font-size: 12px;
    color: #666;
    margin: 0;
}

/* Tally Form Styles */
.tally-form {
    width: 100%;
}

.tally-field-group {
    margin-bottom: 18px;
}

.tally-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tally-input-container {
    position: relative;
}

.tally-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 13px;
    background: #fafafa;
    transition: all 0.3s ease;
    outline: none;
    color: #333;
}

.tally-input:focus {
    border-color: #2c5aa0;
    background: white;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.tally-input::placeholder {
    color: #999;
    font-size: 12px;
}

.tally-input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #2c5aa0;
    transition: width 0.3s ease;
}

.tally-input:focus + .tally-input-border {
    width: 100%;
}

/* Password Toggle */
.tally-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.3s ease;
}

.tally-password-toggle:hover {
    color: #2c5aa0;
}

/* Tally Checkbox */
.tally-options {
    margin-bottom: 18px;
}

.tally-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.tally-checkbox input[type="checkbox"] {
    display: none;
}

.tally-checkmark {
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 3px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
    background: white;
}

.tally-checkbox input[type="checkbox"]:checked + .tally-checkmark {
    background: #2c5aa0;
    border-color: #2c5aa0;
}

.tally-checkbox input[type="checkbox"]:checked + .tally-checkmark::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 3px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.tally-checkbox-text {
    font-size: 12px;
    color: #555;
}

/* Tally Login Button */
.tally-login-btn {
    width: 100%;
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3d72 100%);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.tally-login-btn:hover {
    background: linear-gradient(135deg, #1e3d72 0%, #2c5aa0 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}

.tally-login-btn:active {
    transform: translateY(0);
}

/* Forgot Password */
.tally-forgot-section {
    text-align: center;
    margin-bottom: 18px;
}

.tally-forgot-link {
    color: #2c5aa0;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.tally-forgot-link:hover {
    color: #1e3d72;
    text-decoration: underline;
}

/* Language Section */
.tally-language-section {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

/* Tally Footer */
.tally-footer {
    background: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.tally-version-info {
    font-size: 10px;
    color: #666;
    margin-bottom: 8px;
}

.tally-version-warning {
    color: #dc3545;
    font-weight: 600;
    margin-left: 10px;
}

.tally-demo-info {
    margin-top: 8px;
}

.tally-demo-btn {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 6px 12px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.tally-demo-btn:hover {
    background: #218838;
    color: white;
    text-decoration: none;
}

/* Alert Styles */
.alert {
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 12px;
}

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

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .tally-erp-login {
        padding: 12px;
    }
    
    .tally-login-container {
        max-width: 100%;
    }
    
    .tally-header {
        padding: 15px 20px;
    }
    
    .tally-brand-name {
        font-size: 18px;
    }
    
    .tally-login-box {
        padding: 20px 15px 15px 15px;
    }
    
    .tally-footer {
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .tally-erp-login {
        padding: 8px;
    }
    
    .tally-header {
        padding: 12px 15px;
    }
    
    .tally-logo {
        width: 40px;
        height: 40px;
    }
    
    .tally-brand-name {
        font-size: 16px;
    }
    
    .tally-login-box {
        padding: 15px 12px 12px 12px;
    }
    
    .tally-login-title {
        font-size: 16px;
    }
}

/* Animation for smooth loading */
.tally-login-wrapper {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Focus styles for accessibility */
.tally-input:focus,
.tally-login-btn:focus,
.tally-checkbox:focus-within .tally-checkmark {
    outline: 2px solid #2c5aa0;
    outline-offset: 2px;
}

/* Loading state for button */
.tally-login-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.tally-login-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
